subject

(I NEED ANSWERS RN!!)
How do I change this to a for loop:

int sum=0, sumSquares=0, firstNum=0, secondNum=0

while(firstNum <= secondNum) {

if(firstNum%2 !=0) {

System. out. println(firstNum)

sumSquares+=(firstNum*firstNum)
}

if(firstNum%2 == 0) {

sum+=firstNum;

}

firstNum++

}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Annie is creating a corporate report for a company’s annual meeting. in the report, she wants to add the signature of various department heads. which device can annie use to capture signatures to include in the report? a. printer b. monitor c. e-reader d. digitizing tablet
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
1. before plugging in a new device to a computer you should unplug all other devices turn off the computer turn on the computer 2. many of the maintenance tools for a computer can be found in the control panel under administrative tools display personalization
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Now, open this passage to read about fafsa requirements. describe the information you will need to provide in order to complete a fafsa. list at least three of the required documents you must include.
Answers: 3
question
Computers and Technology, 23.06.2019 17:30
When making changes to optimize part of a processor, it is often the case that speeding up one type of instruction comes at the cost of slowing down something else. for example, if we put in a complicated fast floating-point unit, that takes space, and something might have to be moved farther away from the middle to accommodate it, adding an extra cycle in delay to reach that unit. the basic amdahl's law equation does not take into account this trade-off. a. if the new fast floating-point unit speeds up floating-point operations by, on average, 2ă—, and floating-point operations take 20% of the original program's execution time, what is the overall speedup (ignoring the penalty to any other instructions)? b. now assume that speeding up the floating-point unit slowed down data cache accesses, resulting in a 1.5ă— slowdown (or 2/3 speedup). data cache accesses consume 10% of the execution time. what is the overall speedup now? c. after implementing the new floating-point operations, what percentage of execution time is spent on floating-point operations? what percentage is spent on data cache accesses?
Answers: 2
You know the right answer?
(I NEED ANSWERS RN!!)
How do I change this to a for loop:

int sum=0, sumSquares=0,...
Questions
question
Mathematics, 24.01.2022 23:00
question
Mathematics, 24.01.2022 23:00
question
Mathematics, 24.01.2022 23:00
question
Mathematics, 24.01.2022 23:00
question
Computers and Technology, 24.01.2022 23:00
Questions on the website: 13722367