What does the following program print? void main() int x,y=1,tot=0; for(x=1;x<5;x+=4) if(x==4) continue; tot+=x*y++; cout<

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question
What does the following program print?
void main()
{
int x,y=1,tot=0;
for(x=1;x<5;x+=4)
{
if(x==4)
continue;
tot+=x*y++;
cout<<tot<<endl;
if(y==4)
break;
ww ww
wwwnw
wwww m
}
Select one:
а. 2
b. ZERO
с. 3
d. 1
Transcribed Image Text:What does the following program print? void main() { int x,y=1,tot=0; for(x=1;x<5;x+=4) { if(x==4) continue; tot+=x*y++; cout<<tot<<endl; if(y==4) break; ww ww wwwnw wwww m } Select one: а. 2 b. ZERO с. 3 d. 1
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning