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):
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...
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5bc34bcc-c43e-42ef-b03d-f27a181c2c88%2F1a5284e0-0572-401a-a1f8-c8797ffe1b54%2F3p1wnm_processed.jpeg&w=3840&q=75)
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.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5bc34bcc-c43e-42ef-b03d-f27a181c2c88%2F1a5284e0-0572-401a-a1f8-c8797ffe1b54%2Fdaikxf_processed.jpeg&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY