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:
- Sum Perfects, Greatest Common Divisor (GCD) and Average Primes.
- Binary and Decimal.
- Recursion and Drawings.
- Exit
If user presses a or A, the following sub menu should be displayed
- Sum Perfects.
(Function should return the sum of perfect numbers from 1 to 500)
- GCD: (Function should return the GCD for any two given integers as follows: x=25, y=15, GCD=5).
- Average of Primes: (Function should find the average of primes from 1 to 100)
- Return to the main menu.
If user presses b or B, the following sub menu should be displayed:
- Binary to Decimal.
(Function should take a binary number and convert it to Decimal)
- Decimal to Binary.
(Function should read a decimal number and convert it to Binary)
- Return to the main menu
If user presses c or C, the following sub menu should be displayed:
- Recursive Sum.
(Function should take two integers numbers and find their sum using recursion)
- Draw Triangle 1.
(Function should take the number of rows from the user and draws the following triangular shape)
- Draw Triangle 2.
(Function should take the number of rows from the user and draws the following triangular shape)
- Draw Triangle 4. (Function should take the number of rows from the user and draws the following triangular shape)
- Return to the main menu
To Exit press d or D.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started