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, 22.06.2019 09:00
Designing a mobile web page is a little different from designing a regular web page. name at least three features that should be considered when designing a website that is mobile phone-friendly, and briefly explain why they are important.
Answers: 1
question
Computers and Technology, 23.06.2019 09:10
Effective character encoding requires standardized code. compatible browsers. common languages. identical operating systems.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Uget brainliest if accurate mary has been given the responsibility of hiring a person for the position of a software testing officer. which management function would mary achieve this responsibility?
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
question
Mathematics, 08.03.2021 20:20
question
Mathematics, 08.03.2021 20:20
question
Mathematics, 08.03.2021 20:20
question
Mathematics, 08.03.2021 20:20
question
English, 08.03.2021 20:20
Questions on the website: 13722360