Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[C#]How would I find the range between two numbers specified by user input? The range must be even/odd. For example I ask the user to

[C#]How would I find the range between two numbers specified by user input?

The range must be even/odd. For example I ask the user to type in two numbers, they must both be even or odd.

int number;

Console.WriteLine("Lowest Number");

Int32.TryParse(Console.ReadLine(), out number);

int numberTwo;

Console.WriteLine("Highest number");

Int32.TryParse(Console.ReadLine(), out numberTwo);

Now let's say the user decided to choose 3 and 10, both of which are odd. I must print back all odd values in between these two numbers. So output would be 3, 5, 7, and 10. How would I go about doing this?

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