Write a complete C++ program that apply menu-driven style. Three options that should be created and executed are: 1) Function 1 This user-defined function can accept four (4) parameters which is integer numbers. By using passing parameter by reference this function can change the original position of four numbers and return the multiplication result of four numbers. The changes and additional result are displayed in main () program. Example : 2 4 6 8 (original), 8 6 4 2 (position changed) Multiplication result: 384 Note : Cannot use array. 2) Function 2 This user-defined function can accept two (2) string which is array of character data type. In this function, use built-in function to compare this two string. Display the result whether both string similar or not similar in function 2. Example : char s1[20] is Drone char s2[20] is Drone, Output : similar Note : Cannot use pointer or string data type. 3) Exit from the program.

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

C++ programming. Pls solve. Provide image and code pls.

Question
Write a complete C++ program that apply menu-driven style. Three options that should be
created and executed are:
1) Function 1
This user-defined function can accept four (4) parameters which is integer numbers.
By using passing parameter by reference this function can change the original
position of four numbers and return the multiplication result of four numbers. The
changes and additional result are displayed in main () program.
Example : 2 4 6 8 (original), 8 6 4 2 (position changed)
Multiplication result: 384
Note : Cannot use array.
2) Function 2
This user-defined function can accept two (2) string which is array of character data
type. In this function, use built-in funetion to compare this two string. Display the
result whether both string similar or not similar in function 2.
Example : char s1[20] is Drone char s2[20] is Drone
Output : similar
Note : Cannot use pointer or string data type.
3) Exit from the program.
Transcribed Image Text:Question Write a complete C++ program that apply menu-driven style. Three options that should be created and executed are: 1) Function 1 This user-defined function can accept four (4) parameters which is integer numbers. By using passing parameter by reference this function can change the original position of four numbers and return the multiplication result of four numbers. The changes and additional result are displayed in main () program. Example : 2 4 6 8 (original), 8 6 4 2 (position changed) Multiplication result: 384 Note : Cannot use array. 2) Function 2 This user-defined function can accept two (2) string which is array of character data type. In this function, use built-in funetion to compare this two string. Display the result whether both string similar or not similar in function 2. Example : char s1[20] is Drone char s2[20] is Drone Output : similar Note : Cannot use pointer or string data type. 3) Exit from the program.
Notes:
Refer Figure I below. The input (bold) can be initialized using = operator. No need to enter from
keyboard. The initialization statement should be code/write in main () program. Just initialize and
test for one sample of input of each option.
Example :
numbers is 2 4 6 8
first string is Drone and second string is Drone.
Enter 1: Change nunber position
Enter 2: Compare 2 string
Enter 3: Exit
Choice:
Before function called : 2 4 6 8
Result 4 numbers : 384
After function called : 8 6 4 2
Enter 1: Change number position
Enter 2: Compare 2 string
Enter 3: Exit
Choice :
LAB EXERCISE III
Before function called: Drone Drone
Drone and Drone : similar
Enter 1: Change nunber position
Enter 2:Compare 2 string
Enter 3: Exit
Choice :
Figure 1: Example of implementation
Transcribed Image Text:Notes: Refer Figure I below. The input (bold) can be initialized using = operator. No need to enter from keyboard. The initialization statement should be code/write in main () program. Just initialize and test for one sample of input of each option. Example : numbers is 2 4 6 8 first string is Drone and second string is Drone. Enter 1: Change nunber position Enter 2: Compare 2 string Enter 3: Exit Choice: Before function called : 2 4 6 8 Result 4 numbers : 384 After function called : 8 6 4 2 Enter 1: Change number position Enter 2: Compare 2 string Enter 3: Exit Choice : LAB EXERCISE III Before function called: Drone Drone Drone and Drone : similar Enter 1: Change nunber position Enter 2:Compare 2 string Enter 3: Exit Choice : Figure 1: Example of implementation
Expert Solution
steps

Step by step

Solved in 3 steps with 1 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