Write a c program: Find a number that is greater than 3 (prints until a number than 3 is entered) to find 'b'.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section4.2: The If-else Statement
Problem 3E
icon
Related questions
Question

Write a c program:

Find a number  that is greater than 3 (prints until a number than 3 is entered) to find 'b'. 

Then the user must enter another number that is greater than the previous entered starting point to stop finding 'b'.

 

Another number should be entered that is greater than 0 find 'r'.

User should enter another number that needs to be greater than 'r' to stop finding 'r'.

 

Now you must compute the value of 'b' and 'r'. For the 'b', there should be an r where the gdc(r,r+i)>2 or gcd(r+b,r+i)>2. If it is true, then print the value of b and r, else print “no”.

 

'b' is a positive number where a+i are the consecutive integers (until the stop finding r) where 0<i<b.

The program should start from the entered b value to the stop finding value b.

Expert Solution
steps

Step by step

Solved in 4 steps with 7 images

Blurred answer
Knowledge Booster
Bare Bones Programming Language
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning