Question: C++ Prints on screen a selection menu as follow: Sum Perfects, Greatest Common Divisor (GCD) and Average Primes. Binary and Decimal. Recursion and Drawings. Exit

C++

Prints on screen a selection menu as follow:

  1. Sum Perfects, Greatest Common Divisor (GCD) and Average Primes.
  2. Binary and Decimal.
  3. Recursion and Drawings.
  4. Exit

If user presses a or A, the following sub menu should be displayed

  1. Sum Perfects.

(Function should return the sum of perfect numbers from 1 to 500)

  1. GCD: (Function should return the GCD for any two given integers as follows: x=25, y=15, GCD=5).
  2. Average of Primes: (Function should find the average of primes from 1 to 100)
  3. Return to the main menu.

If user presses b or B, the following sub menu should be displayed:

  1. Binary to Decimal.

(Function should take a binary number and convert it to Decimal)

  1. Decimal to Binary.

(Function should read a decimal number and convert it to Binary)

  1. Return to the main menu

If user presses c or C, the following sub menu should be displayed:

  1. Recursive Sum.

(Function should take two integers numbers and find their sum using recursion)

  1. Draw Triangle 1.

(Function should take the number of rows from the user and draws the following triangular shape)

  1. Draw Triangle 2.

(Function should take the number of rows from the user and draws the following triangular shape)

  1. Draw Triangle 4. (Function should take the number of rows from the user and draws the following triangular shape)

  1. Return to the main menu

To Exit press d or D.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!