I am typing the following simple for loop into codeblocks and getting 5050 instead of 1 through 100
#include <iostream>
using namespace std;
int main()
{
int x = 0;
int i;
for (i = 1; i <= 100; i++)
{
x += i;
}
cout << x << endl;
return 0;
}
great compiler if it works! I need some answers pronto is there anybody there that can get me going in the right direction