Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE C# 5.0 MAKE SURE THERE ARE NO ERROR SO THE PROGRAM RUNS Write a program to count the number of even and odd numbers

USE C# 5.0 MAKE SURE THERE ARE NO ERROR SO THE PROGRAM RUNS

Write a program to count the number of even and odd numbers from a series of numbers whose starting and ending number is provided by the user.

The starting number must be less than the ending number. The program should continue asking the user for a valid ending number until it is larger than the starting number.

The range is inclusive -- the starting and ending numbers should be tested and counted as part of the series.

Sample Program Runs

After your program runs, the console should look like the following examples. The exact output will vary depending on what the user inputs.

Starting number: 2 Ending number: 10 There were 5 even numbers There were 4 odd numbers 

Starting number: 5 Ending number: 4 Ending number must be greater than starting number! Ending number: 5 Ending number must be greater than starting number! Ending number: 6 There were 1 even numbers There were 1 odd numbers

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

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions