Question: Given the code below, which of the following loops will continue to accept yalues for the variable age, and print them out, as long as
Given the code below, which of the following loops will continue to accept yalues for the variable age, and print them out, as long as the value entered is greater than zero? int age ;
a coul "Enter an age greater than zero" : cin age;
do begin loop
cout "The age entered was age endl endl;
cout "Enter an age greater than zero cin age;
while age :
b cout "Enter an age greater than zero cin age;
while age begin loop
r
cout The age entered was. age endl endl;
cout "Enter an age greater than zero:";
cin age;
c for ;; begin loop
cout "Enter an age greater than zero:"; cin age;
cout "The age entered was: age endl endl;
d do begin loop
cout "The age entered was age endl endl; cout "Enter an age greater than zero" : cin age:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
