تم الحل ✓
categoryبرمجة وتطوير البرمجيات
schoolبكالوريوس
event_available2026-07-15
السؤال
Transcribed Image Text:
4.
Trainers at Tom's Athletic Club are encouraged to enroll new members. Write
an application that allows Tom to enter the names of each of his 25 trainers and
the number of new members each trainer has enrolled this year. Output is the
number of trainers who have enrolled 0 to 5 members, 6 to 12 members, 13 to 20
members, and more than 20 members.
(continued)
start
Declarations
num quantity
num SIZE=4
num DISCOUNTS[4] =
num QUAN LIMITS[4]
0, 0.10, 0.15, 0.20
0.
9,
13,
26
num x
num QUIT -1
housekeeping()
while quantity QUIT
determineDiscount()
endwhile
finish()
stop
housekeeping()
output "Enter quantity ordered or ", QUIT, to quit
input quantity
return
determineDiscount()
x-SIZE-1
while quantity <QUAN LIMITS [x]
XNX-1
endwhile
output "Your discount rate is ", DISCOUNTS[x]
output "Enter quantity ordered or ", QUIT,
input quantity
return
finish()
output "End of job"
return
to quit
and Design, Ninth Edition
Figure 6-1
Program th
mines disc
check_circle الجواب — حل مفصل خطوة بخطوة
hourglass_top
🔒
الحل الكامل متاح للمشتركين
اشترك في أرشيف الأسئلة لعرض هذا الحل وآلاف الحلول المفصلة خطوة بخطوة من معلمين معتمدين.