13.) What is the output of the following loop? int total = 13; for (int num = 1; num <= (total / 2); num++ ){ total = total –- num; System.out.println( total + " "+ num); }

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question

Need answer in both execution and paper work 

Else skip 

Proper explanation got thumbs-up

13.)
What is the output of the following loop?
int total = 13;
for (int num =
1; num <= (total / 2); num++ ){
total = total – num;
System.out.printIn( total + “" + num);
Transcribed Image Text:13.) What is the output of the following loop? int total = 13; for (int num = 1; num <= (total / 2); num++ ){ total = total – num; System.out.printIn( total + “" + num);
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
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