Consider the following code snippet
int value = -999;
int count = 2;
while (value != 25 || value != 70)
{
cin >> value;
if(count == 10)
break;
count++;
}
Assume the user enters the following input sequence, how many
times will this loop run
93, 71, 5, 19, 24, 25, 50, 70, 88, 45, -999
Infinite
10
6
8
9
Consider the following code snippet int value = -999; int count = 2; while (value != 25 || value != 70) { cin >> value;
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am