Answered step by step
Verified Expert Solution
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
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
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