
Programming Logic and Design, Introductory 7th Edition by Joyce Farrell
النسخة 7الرقم المعياري الدولي: 1285225562
Programming Logic and Design, Introductory 7th Edition by Joyce Farrell
النسخة 7الرقم المعياري الدولي: 1285225562a. The Down dog Yoga Studio offers five types of classes, as shown in Table 6-2. Design a program that accepts a number representing a class and then displays the name of the class.
b. Modify the Down dog Yoga Studio program so that numeric class requests can be entered continuously until a sentinel value is entered. Then display each class number, name, and a count of the number of requests for each class.
الخطوة 1 من9
a.
The following is the program to accept a number representing a class and then displays the yoga class name:
Program:
start
Declarations
num classNum = 0
num SIZE = 5
num classNumbers[SIZE] = 1, 2, 3, 4, 5
string classNames[SIZE] = "Yoga 1", "Yoga 2",
"Children's Yoga",
"Prenatal Yoga",
"Senior Yoga"
getReady()
classNum = classNum - 1
finishUp()
stop
getReady()
output "Enter the class number between 1 to 5: "
input classNum
return
finishUp()
output "You have opted for the class: "
output classNames[classNum]
return
الخطوة 2 من 9
الخطوة 3 من 9
الخطوة 4 من 9
الخطوة 5 من 9
الخطوة 6 من 9
الخطوة 7 من 9
الخطوة 8 من 9
الخطوة 9 من 9
لماذا لم يعجبك هذا التمرين؟
أخرى