Write a complete program for a Menu System that will display the following for its menu: MAIN MENU 1.) Display Triangle 2.) Multiplication Table 3.) Power Table 4.) Quit Enter your choice ( 1-4):

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

help me please. asap. i will give thumbs up. the instructions is on the two images

Write a complete program for a Menu System that will display the
following for its menu:
MAIN MENU
1.) Display Triangle
2.) Multiplication Table
3.) Power Table
4.) Quit
Enter your choice ( 1-4):
The program must create the following User-Defined Functions prototyped as : 1.) void
Triangle(void) - this UDF will be called by the main() function when 1
(Display Diamond) is selected from the Main Menu, to print the triangle-shaped
arrangement of letters shown below. Printing should be done using nested loop
inside the UDF body and should not be coded manually.
A
B D
сЕ G
D FHJ
Е G I Kм
D FHJ
CE G
в D
A
Transcribed Image Text:Write a complete program for a Menu System that will display the following for its menu: MAIN MENU 1.) Display Triangle 2.) Multiplication Table 3.) Power Table 4.) Quit Enter your choice ( 1-4): The program must create the following User-Defined Functions prototyped as : 1.) void Triangle(void) - this UDF will be called by the main() function when 1 (Display Diamond) is selected from the Main Menu, to print the triangle-shaped arrangement of letters shown below. Printing should be done using nested loop inside the UDF body and should not be coded manually. A B D сЕ G D FHJ Е G I Kм D FHJ CE G в D A
2.) void MultiplicationTable( int N) -this UDF will be called by the main() function
when 2 ( Multiplication Table ) is selected from the Main Menu, to display the
Multiplication Table for numbers from 1 to N, where N, the UDF's argument, is
a value to be entered from the keyboard.
3.) void PowerTable( int N)- this UDF will be called by the main() function
when 3 ( Power Table ) is selected from the Main Menu, to display in tabulated
form the 2nd, 3rd, 4th, and 5th power of numbers from 1 to N, where N, the
UDF's argument is a value to be entered from the keyboard. The UDF must print
first the header: N
N^2
N^3
N^4
N^5
The program must not use the built-in pow() function. You have to create your
own pow() function prototyped as :
void MyPow( double x, double y, double *z);
This UDF will compute x raised to the y power without using the built-in cmath
function and pass the computed value to main() function through its pointer
parameter, *z. The Main Menu should be placed inside an infinite loop which will
terminate only when 4 (Quit) is selected from the Main Menu. If an invalid
choice is entered from the keyboard, the program will print," Please enter 1 to 4
only for your choice." Then, print again the Main Menu.
4) Write a complete program that will load a Two-Dimensional array A[7][7] with the first 49 numbers, then print the following :
a.) the content of the original array
b.) the content of the array with the elements of the 3rd row and 5th
interchanged.
row
c.) the content of the array with the elements of the 2nd col and 6th col
interchanged.
d.) the content of the array with the 2 diagonal elements interchanged.
Transcribed Image Text:2.) void MultiplicationTable( int N) -this UDF will be called by the main() function when 2 ( Multiplication Table ) is selected from the Main Menu, to display the Multiplication Table for numbers from 1 to N, where N, the UDF's argument, is a value to be entered from the keyboard. 3.) void PowerTable( int N)- this UDF will be called by the main() function when 3 ( Power Table ) is selected from the Main Menu, to display in tabulated form the 2nd, 3rd, 4th, and 5th power of numbers from 1 to N, where N, the UDF's argument is a value to be entered from the keyboard. The UDF must print first the header: N N^2 N^3 N^4 N^5 The program must not use the built-in pow() function. You have to create your own pow() function prototyped as : void MyPow( double x, double y, double *z); This UDF will compute x raised to the y power without using the built-in cmath function and pass the computed value to main() function through its pointer parameter, *z. The Main Menu should be placed inside an infinite loop which will terminate only when 4 (Quit) is selected from the Main Menu. If an invalid choice is entered from the keyboard, the program will print," Please enter 1 to 4 only for your choice." Then, print again the Main Menu. 4) Write a complete program that will load a Two-Dimensional array A[7][7] with the first 49 numbers, then print the following : a.) the content of the original array b.) the content of the array with the elements of the 3rd row and 5th interchanged. row c.) the content of the array with the elements of the 2nd col and 6th col interchanged. d.) the content of the array with the 2 diagonal elements interchanged.
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY