Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am asked to figure out what this is for preparation for a quiz, I understand sort of how it works but am stuck I

I am asked to figure out what this is for preparation for a quiz, I understand sort of how it works but am stuck I get that it only loops for a max of 3 times but could someone explain step by step in layman's terms exactly how and the steps that it does to get to it?

int i, sum = 0; for (i=4; i>2; i--) { sum = sum + i; while (sum < 10) { sum = sum * 2 - 3; System.out.println(sum); } System.out.println(i + " " + sum); }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

What is meant by the intrinsic value of a bond?

Answered: 1 week ago

Question

3 > O Actual direct-labour hours Standard direct-labour hours...

Answered: 1 week ago