how will you write a code if the output is like this?
Two nested loops where the the output is the index of the first loop.
and..
like this?
A single loop where you use variable (like x) to store the result of the addition of the previous two values (like p1, p2) and output that variable. Then p1 = p2 and p2 = x for the next iteration
output:
1 2
std::cout << value;
std::cout << std::endl; // output of a new line