Solved Problem #CPP#5362
Back
Problem Statement - Output writing – Three for loops
Write the output of the following code. Assume all header files are included.
int main()
{
int i;
for(i=10; i>6; i=i-2) cout<<i<<" ";
cout<<endl;
for(i=-5; i> -8; i--) cout<<i+1<<" ";
cout<<endl;
for(i=-3,sum=0; i<3; i--) cout<<sum++<<" ";
cout<<endl;
return 0;
}
