Write a shell program to do the following. a. Do the following for 3 students b. Get name, age, gender for all the 3students as input. c. For all 3 children - Check if "age" is between 1 to 14 (display as (display as "Teens") or greater than 19 (display as “Adult"). d. Display the name, age, gender for all the 3 students.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 19PE
icon
Related questions
Question
Answer (b) and (c) and (d)
Write a shell program to do the following.
a. Do the following for 3 students
b. Get name, age, gender for all the 3students as input.
c. For all 3 children - Check if "age" is between 1 to 14 (display as "Kids") or between 15 to 19
(display as "Teens") or greater than 19 (display as “Adult").
d. Display the name, age, gender for all the 3 students.
Age is between 1 to 14
Age is between 15 to 19
Age >19
Kids
Teens
Adult
Transcribed Image Text:Write a shell program to do the following. a. Do the following for 3 students b. Get name, age, gender for all the 3students as input. c. For all 3 children - Check if "age" is between 1 to 14 (display as "Kids") or between 15 to 19 (display as "Teens") or greater than 19 (display as “Adult"). d. Display the name, age, gender for all the 3 students. Age is between 1 to 14 Age is between 15 to 19 Age >19 Kids Teens Adult
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Fundamentals of Boolean Algebra and Digital Logics
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++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning