I have a simple for loop , which prints out [actually it must , but it doesn’t] all numbers from 1 till `365“ (a year).
so , here is it :
#include <iostream>
using namespace std;
int main()
{
for(int i = 1; i <= 365; i++)
{
cout<<i<<endl;
}
}
So the output must be:
1
.
.
.
365
but it’s like that:
70
.
.
.
365
P.S There aren’t any errors at compilation & execution.
I don’t see anything wrong with the code. Are you using Windows command prompt?
Your buffer size might not be long enough and the output is getting cut off. Right click on the command prompt title bar > properties > height and increase it