Heres the question:Develop the code and example values necessary, to
demonstrate to a user, the differences in execution
of the following four statements:
{
++count;
count++;
--index;
index--;
}
here is my attempt
int main (void)
{
int count,index;
count=1; //intialize count
while (count <= 10)
{
cout<<count<<" ";
++count; // increment count
}
count=1; //intialize count
while (count <= 10)
{
cout<<count<<" ";
count++; // increment count
}
index=1; //intialize count
while (count <= 10)
{
cout<<index<<" ";
--index; // increment count
}
index=1; //intialize count
while (index <= 10)
{
cout<<count<<" ";
index--; // increment count
}
return 0;
}
Help?