In: Computer Science
How many times is "invalid" displayed in the following loop?
for (int k=o; k<3; K++)
{ for(int j =0; j < 4; j++)
{ cout << "invalid"; }
}
Question:
How many times is "invalid" displayed in the following loop?
for (int k=0; k<3; k++)
{
for(int j =0; j < 4; j++)
{
cout << "invalid ";
}
}
Ans: 12 times. The word "invalid" is printed 12
times using both the for loops.
Please check the
compiled program and its output for your reference:
Output:
(Feel free to drop me a comment, If you need any help)
Hope this Helps!!!
Please upvote as well, If you got the answer?
If not please comment, I will Help you with that...