Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Perform the following within a comprehensive program according to the following requirements, based on the attached example to understand the concept: a ) Create a

Perform the following within a comprehensive program according to the following
requirements, based on the attached example to understand the concept:
a) Create a program that accepts two numbers from users.
b) Create a loop to print a range of numbers starting from the first number to the second number entered
by the user.
c) The start and end of the range should not be printed. For example, if the first number is 1 and the
second number is 5, you should print 2,3,4.
d) If the first number is greater than the second number, reverse the numbers (e.g. If the person enters the
first number as 5 and the second number as 1, reverse the numbers and make the range start from 1 to
e) Do not print even numbers within the range.
More details about input and output as below
1**
Test case 1
Number One: 1
Number Two: 9
output: 3,5,7
Test case 2
Number one: 2
Number Two: 15
Output: 3,5,7,9,11,13
Test Case 3
Number One: 8
Number Two: 2
output: 3,5,7
image text in transcribed

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

Transactions On Large Scale Data And Knowledge Centered Systems Vi Special Issue On Database And Expert Systems Applications Lncs 7600

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2012th Edition

ISBN: 3642341780, 978-3642341786

More Books

Students also viewed these Databases questions