Consider the following code snippet int value = -999; int count = 2; while (value != 25 || value != 70) { cin >> value;

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Consider the following code snippet int value = -999; int count = 2; while (value != 25 || value != 70) { cin >> value;

Post by answerhappygod »

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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply