If you know the basics of how C programs work, then you can easily map the value to the output of the program,
void main ()
{
int digit; for (digit = 0; digit <= 9 ; digit++) { cout << digit << "\n"; }
digit= 5 * digit; --digit; cout << digit; }
And we all know that 5x10=50 and 50-1=49. If this program doesn't make sense, please ask your instructor to start again and teach these to you again as you have no idea about them at all. This is a common problem among beginners, they don't understand the basics and they try to build something big — which does not work.