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, 21.06.2019 15:30
Some of the items below indicate the steps required to move a slide to a different location in a presentation. select those steps and indicate the order in which they should be performed to move the slide. (for example, if an item describes what you do first, select 1.) included in the list are items that are not part of the process. for these items, select n/a, an abbreviation for not applicable. 1 — first 2 — second 3 — third 4 — fourth 5 — fifth 6 — sixth n/a — not applicable drag the slide to the desired place. enter the slide position desired. hold the mouse button down. select move from the tools menu. select the slide. switch to the notes view.
Answers: 3
question
Computers and Technology, 22.06.2019 11:00
When working with a team you should always do the following, except? question 3 options: be dependable and trustworthy be sensitive to others feelings do your fair share critique members of the group
Answers: 2
question
Computers and Technology, 22.06.2019 12:30
Some of the first computer games were created in the early 1970s by college students experimenting after hours to see what the were capable of doing.
Answers: 3
question
Computers and Technology, 23.06.2019 03:30
In vista and windows 7, the appearance and personalization option allows you to change the
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
Computers and Technology, 04.11.2020 01:00
question
Mathematics, 04.11.2020 01:00
question
Mathematics, 04.11.2020 01:00
question
Health, 04.11.2020 01:00
Questions on the website: 13722361