subject

Consider the following two code segments. in both, assume that n is an integer variable that has been declared and initialized. segment 1 int prod = 1; int i; for (i = 2; i < = n; i++) { prod *= i; } system. out. println(prod); segment 2 int prod = 1; int i = 2; while (i < = n) { prod *= i; i++; } system. out. println(prod); for which integer values of n do these code segments print the same result?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Business professionals of america, and future business leaders of america – phi beta lambda are both open to business students at which levels? check all that apply. elementary school middle school high school college
Answers: 1
question
Computers and Technology, 21.06.2019 22:30
Provide an example of a project that combines the three principles of lean six sigma with business project management (bpm) and services oriented architecture (soa). identify the elements of the project that comply with each of three principles.
Answers: 1
question
Computers and Technology, 22.06.2019 04:30
Ryan is working on the layout of her web page. she needs to figure out where her header, navigation bar, text, and images should go. what technique can her?
Answers: 1
question
Computers and Technology, 22.06.2019 06:30
This technology is used to produce high-quality documents that look good on the computer screen and in print.
Answers: 1
You know the right answer?
Consider the following two code segments. in both, assume that n is an integer variable that has bee...
Questions
Questions on the website: 13722359