Computers and Technology

Write a program that will ask a user for how many numbers they would like to check. Then, using a for loop, prompt the user for a number, and output if that number is even or odd. Continue doing this as many times as the user indicated. Once the loop ends, output how many even numbers were
entered and how many odd numbers were entered
Hint: For a number to be even when the number is divided by 2. there should be no remainder - so you will want to use the modulus (%) operator.
Hint: You will need two count variables to keep track of odd and even numbers.
Sample Run 1
How many numbers do you need to checks
Enter unter 20
20 is an even number.
Enter number: 3)
33 anood number
Enter ruber: 4
4 is an even number
Enter bert77
73 is an odd number
Later :
15 an even number
you entered number(s).
you entered 2 od number(s).
Sample Run 2
Hanumbers do you need to check
30 is een ruber.
Enter ute!
315 od ruber.
Enter uber 4
you entered seven number(s).
You entered 1 hue(s).
Benchmarks
1. Prompt the user to answer the question. "How many numbers do you need to check?"
2. Create and initialize two count variables one for add and one for even
3. Based on the previous input, create a for loop that will run that exact number of times.
1. Prompt the user to 'Enter number:
2. If that number is even output "Inumber is an even number:
3. Update the even count variable.
4. Orelse if the number is odd. output number is an odd number:
5. Update the odd count variable
4. Output "You entered numberleven numbers
5. Output "You entered number odd numbers)

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 18:00, bubbles173883
While inserting images, the picture command is usually used to insert photos from a digital camera, and the clip art command is usually used to a. edit the sizes and other characteristics of photos that have been inserted. b. take a screenshot of an image and copy it to the clipboard for pasting. c. search for drawings or other images from a library of prepared pictures. d. make illustrations using lines and shapes that are easy to manipulate.
Answers: 1
image
Computers and Technology, 25.06.2019 05:00, Satoetoe24
Craig keeps missing important staff meetings and getting double-booked for appointments. craig should use scheduling software a database diagramming software a word processor
Answers: 1
image
Computers and Technology, 25.06.2019 06:00, DASASDAEDWEDA
Sam needs to create a spreadsheet for his coworkers. they will need to follow a crossed a long road of data. sam would like to make his spreadsheet easy to read. sam should
Answers: 1
image
Computers and Technology, 25.06.2019 19:40, TrucerZ6707
Determine if the given system is consistent. do not completely solve the system.
Answers: 1
Do you know the correct answer?
Write a program that will ask a user for how many numbers they would like to check. Then, using a fo...

Questions in other subjects:

Konu
English, 16.09.2019 02:30