Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a C# Program Console Program with Iterative Statements that does the following: 1. Choose to write your program with only 1 of the 3

image text in transcribed

write a C# Program Console Program with Iterative Statements that does the following: 1. Choose to write your program with only 1 of the 3 choices of Iterative Statements: While, For, or Do While (Just choose 1) 2. Ask the user to enter an integer value between 2 and 10. 3. Write a test to determine if the user entered an even number or an odd number. 4. If the user entered an even number, then calculate the next higher number (which would an odd number) and print the statement "You entered an even number" that many times. For example, if user entered 4, then print this statement 5 times: "You entered an even number". Your Console output should look like this: Enter Integer between 2 and 10: 4 You entered an even number You entered an even number You entered an even number You entered an even number You entered an even number If the user entered an odd number, then calculate the next lower number (which would be an even number) and print the statement "You entered an odd number" that many times. For example, if user entered 7, then print this statement 6 times: "You entered an odd number". Your Console output should look like this: Enter Integer between 2 and 10: 7 You entered an odd number You entered an odd number You entered an odd number You entered an odd number You entered an odd number You entered an odd number

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions