Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ problem Please help me with it. Thank you. the output would be like this: 10-20 with sequence 10 - 30 no sequence: this is

C++ problem

Please help me with it. Thank you.

image text in transcribed

the output would be like this:

10-20 with sequence

image text in transcribed

10 - 30 no sequence:

image text in transcribed

this is the background:

image text in transcribed

Project Description / Specification Your program takes as input three integer values (same line, space separated) the first two integers, the beginning and ending value in a range of integers you are going to examine, as space separated integers. They are in that order: the first is the lower range and the second is the upper range. Calculate the sequence for each value in that range inclusive of the endpoints the third integer a value indicating whether to print each sequence: 1 (indicating yes) or 0 (indicating no) * Your program will print (look at the Mimir test cases for examples) the sequence for each number in the range on a separate line if the third input value is 1 . note in printing the sequence the numbers are followed by a comma, except for the last number in the sequence. A personal pet peeve of mine. o On a separate line, two comma separated numbers. For the sequence that is the longest, print the starting number and the length of the sequence (again, see Mimir for format) On a separate line, two comma separated numbers. For the sequence that contains the biggest number, print the starting number and the biggest number in that sequence. . Requirements I. You should check that the first two input range numbers are >= 2, and that the smallest (the first entered value) is indeed strictly smaller than the second (the second value). If not, the program prints an error message and halts Notes I. The % (modulus) operator is useful for this project 2. If you ask for a large enough element, you might overflow an integer. If you go big enough, you will overflow a long (though it will take awhile)

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

Database Systems For Advanced Applications 27th International Conference Dasfaa 2022 Virtual Event April 11 14 2022 Proceedings Part 2 Lncs 13246

Authors: Arnab Bhattacharya ,Janice Lee Mong Li ,Divyakant Agrawal ,P. Krishna Reddy ,Mukesh Mohania ,Anirban Mondal ,Vikram Goyal ,Rage Uday Kiran

1st Edition

3031001257, 978-3031001253

More Books

Students also viewed these Databases questions

Question

List the guidelines for effective headings.

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago