Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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 Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

=+ Are some laws more important than others? If so, which ones?

Answered: 1 week ago

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago

Question

What is Ohm's law and also tell about Snell's law?

Answered: 1 week ago