Sample Problem
•
What does this code print? Find the bug.
•
#include <iostream>
•
•
using namespace std;
•
•
int main()
•
{
•
int n = 1;
•
for ( int i = 0; i < 6; i++
)
•
{
•
n *= i;
•
cout << n << " ";
•
}
•
}
Ans:
0 0 0 0 0 0