Write a C++ program based on the following requirements (using array technique): • The program will acquire the user to enter five names. The program then displays the name in the reverse order of entry. This means that the last name will be displayed first, followed by the fourth, and so on. (LIFO) • Copy paste your program code and submit it with your lab report.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 8PP: (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays...
icon
Related questions
Question
Program Design 1
Write a C++ program based on the following requirements (using array technique):
The program will acquire the user to enter five names.
The program then displays the name in the reverse order of entry. This means that
the last name will be displayed first, followed by the fourth, and so on. (LIFO)
Copy paste your program code and submit it with your lab report.
Example of program output:
OUTPUT CONSOLE (Sample #1)
Please enter five name:
1) Faiz [Enter]
2) Wani [Enter]
3) Atin [Enter]
4) Alin [Enter]
5) Idil [Enter]
The names in reverse order are:
1] Idil
2] Alin
3] Atin
4] Wani
5] Faiz
OUTPUT CONSOLE (Sample #2)
Please enter five name:
1) Isyraf Faiz [Enter]
2) Fauzana Iwani [Enter]
3) Fatin Izzati [Enter]
4) Fadhlin Ilyana [Enter]
5) Ahmad Idil [Enter]
The names in reverse order are:
1] Ahmad Idil
2] Fadhlin Ilyana
3] Fatin Izzati
4] Fauzana Iwani
5] Isyraf Faiz
Transcribed Image Text:Program Design 1 Write a C++ program based on the following requirements (using array technique): The program will acquire the user to enter five names. The program then displays the name in the reverse order of entry. This means that the last name will be displayed first, followed by the fourth, and so on. (LIFO) Copy paste your program code and submit it with your lab report. Example of program output: OUTPUT CONSOLE (Sample #1) Please enter five name: 1) Faiz [Enter] 2) Wani [Enter] 3) Atin [Enter] 4) Alin [Enter] 5) Idil [Enter] The names in reverse order are: 1] Idil 2] Alin 3] Atin 4] Wani 5] Faiz OUTPUT CONSOLE (Sample #2) Please enter five name: 1) Isyraf Faiz [Enter] 2) Fauzana Iwani [Enter] 3) Fatin Izzati [Enter] 4) Fadhlin Ilyana [Enter] 5) Ahmad Idil [Enter] The names in reverse order are: 1] Ahmad Idil 2] Fadhlin Ilyana 3] Fatin Izzati 4] Fauzana Iwani 5] Isyraf Faiz
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr