Question: [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
Get step-by-step solutions from verified subject matter experts
