Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ program Write a program that prints out the following menu: 1- Calculate the series. 2- Draw triangle 3- Read numbers 4- Reverse even digits

C++ program
image text in transcribed
image text in transcribed
image text in transcribed
Write a program that prints out the following menu: 1- Calculate the series. 2- Draw triangle 3- Read numbers 4- Reverse even digits 5- Exit If the user press one: the program should calculate the following series: n axi Bi! Where: a is the sum of prime numbers from 1 to Xi B is the reverse of Xi X, n:integers given by the user. If the user press 2: The program should draw an isosceles triangle (till slutela), the number of lines is given by the user consider the following example: If the user entered 5, then the program should print: If the user press 3: The program reads numbers from user until is entered, then it displays another menu: 1- Max number If the user press 3: The program reads numbers from user until O is entered, then it displays another menu: 1. Max number 2- Min number 3- Average. 4- Print the numbers in reverse. 5. Return If user press 1: the program should print the largest number of the entered numbers. If user press 2: the program should print the smallest number of the entered numbers. If the user press 3: the program should print the average between the numbers. If user press 4: the program should print all the entered numbers in reverse order. If the user press 5: the program should return and display main menu. Example input: 7958230 Output: 1- 9 2- 2 3- 5.666667 4- 328597 If the user press 4: The program should read a number from user and prints the reverse of even digits only. Example input: 958746 Output: 648 The menu will always display until the user press 5, the program will stop

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

Evaluate 3x - x for x = -2 Answer:

Answered: 1 week ago

Question

What is group replacement? Explain with an example. (2-3 lines)

Answered: 1 week ago