+ 1
Fill in the blanks to print "this is a loop" to the screen 15 times.
if you wont to print in the screen 15 time, you must set 16, the question is wrong i think Fill in the blanks to print "this is a loop" to the screen 15 times. i put int x = 1; do { cout << "this is a loop" << endl; x++; } while (x<= 16); and sees wrong, and the right one is 15, but is 14 times in to the screen
10 Antworten
+ 3
Because the conditional operator used is "equals to or less than"
+ 2
15 and ++!
+ 1
answer is
15 and ++
+ 1
Fill in the blanks to print "this is a loop" to the screen 15 times.
int x = 1;
do {
cout << "this is a loop" << endl;
x++;
}
while (
x
<=
15
);
0
the question is print to the screen 15 times !!! if i put while(x<=15); i print to the screen 14 times !!!
i think the question is wrong !!!
0
The only wrong thing in your code is the while conditon. How you already initiate x with the value 1, the conditional needs to be:
x < 16 OR x <= 15
0
is a question in the courses, ant the question is
Fill in the blanks to print "this is a loop" to the screen 15 times.
to the screen 15 times if i put while (x<= 16);
i print 15 times but the anser is wrong,
and the right is while (x<= 15);
but i print 14 times
0
don't write silly comments because i need a answer!
0
plz,can you stop?
0
Fill in the blanks to print the numbers 0 through 5 using the do-while loop: