[ create a new paste ] login | about

Link: http://codepad.org/R0XOlgCE    [ raw code | output | fork ]

C++, pasted on Dec 18:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>

int main()
{
	int total = 0;
	for (int x = 0; x < 1000; x+= 3)
	{
		total += x;
	}
	for (int y =0; y < 1000; y+= 5)
	{
		total += y;
	}
	std::cout << total << std::endl;
}


Output:
1
266333


Create a new paste based on this one


Comments: