subject

Write a class that uses DO-WHILE loops to perform the following steps:
a) prompt the user to input two integers: firstNum and secondNum. firstNum must be less than secondNum (data validation should always be a while loop with lead and looping prompts)
b) output all the odd numbers from firstNum to secondNum. Also output all the even numbers from firstNum to secondNum
c) output the sum of all the even numbers from firstNum to secondNum
d) output all the numbers from firstNum to secondNum and their squares
e) output the sum of the squares of all the odd numbers from firstNum to secondNum

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
What is the foundation for proper monitoring, load balancing and routing in distributed systems
Answers: 3
question
Computers and Technology, 23.06.2019 01:00
Complete the sentence about a presentation delivery method
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
In simple terms, how would you define a protocol?
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
Jacking is a crime that takes place when a hacker misdirects url to a different site. the link itself looks safe, but the user is directed to an unsafe page
Answers: 1
You know the right answer?
Write a class that uses DO-WHILE loops to perform the following steps:
a) prompt the user to i...
Questions
question
Health, 22.02.2020 05:02
question
Mathematics, 22.02.2020 05:02
Questions on the website: 13722363