subject

Run your program again and enter "-4". Your do-while loop should stop because this number is even, but we were actually wanting the user to enter a positive even number. Hence we want a do-while loop condition that is true if "number is not positive" (num <= 0) OR "number is odd" (num%2 == 1). If we use an AND here by mistake the do-while loop will not work correctly.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:30
The place where the extended axis of the earth would touch the celestial sphere is called the celestial
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What is the name of the sound effect that danny hears
Answers: 1
question
Computers and Technology, 23.06.2019 18:40
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
question
Computers and Technology, 23.06.2019 23:40
Which of the following calculates the total from the adjacent cell through the first nonnumeric cell by default, using the sum function in its formula? -average -autosum -counta -max
Answers: 1
You know the right answer?
Run your program again and enter "-4". Your do-while loop should stop because this number is even, b...
Questions
question
History, 27.03.2020 21:48
question
Mathematics, 27.03.2020 21:48
question
Geography, 27.03.2020 21:48
Questions on the website: 13722367