A portrait studio charges its customers for portrait sitting based on the number of subjects posing for the portrait. The fee schedule is as follows:
Subjects in
potrait Base price
1 $100
2 $130
3 $150
4 $165
5 $180
6 $190
7 or more $200
Write a pseudocosde for the following:
A program that accepts the following data continuously until EOF: the last name of the family sitting for the portrait, the number of subjects in the portrait, the schedule day of the week, and the scheduled time of day. Declare appropriate variables and constants with matching data types. Include proper input statements. Display the above data and calculated sitting fee only for a sitting schedule on Thursday after 1:00p.m. or Friday before noon.
MY Code:
"String (Family_Name) = A
String (Subjects_in_Portrait) = B
String (Day_of_Week) = C
String (Apt_Time) = D
String (Base_Price) = P
Start
Get A, B, C, D
IF B = 1, THEN
P = $100.00
ELSE IF B =2, THEN
P = $130.00
ELSE IF B=3, THEN
P=$150.00
ELSE IF B=4, THEN
P=$165.00
ELSE IF B=5, THEN
P=$180.00
ELSE IF B=6, THEN
P=$190.00
ELSE IF B >=7, THEN
P=$200.00
END IF
RETURN A, B, C, D, P
Stop"
Please help with corrections or advice, this is one of the early assignments, I am looking through the chapters for help but figured you guys could add to it. Where does EOF fit in? What does the time of day have to do with?
Question
Alladaskill17
PROBLEM:
A portrait studio charges its customers for portrait sitting based on the number of subjects posing for the portrait. The fee schedule is as follows:
Subjects in
potrait Base price
1 $100
2 $130
3 $150
4 $165
5 $180
6 $190
7 or more $200
Write a pseudocosde for the following:
A program that accepts the following data continuously until EOF: the last name of the family sitting for the portrait, the number of subjects in the portrait, the schedule day of the week, and the scheduled time of day. Declare appropriate variables and constants with matching data types. Include proper input statements. Display the above data and calculated sitting fee only for a sitting schedule on Thursday after 1:00p.m. or Friday before noon.
MY Code:
"String (Family_Name) = A
String (Subjects_in_Portrait) = B
String (Day_of_Week) = C
String (Apt_Time) = D
String (Base_Price) = P
Start
Get A, B, C, D
IF B = 1, THEN
P = $100.00
ELSE IF B =2, THEN
P = $130.00
ELSE IF B=3, THEN
P=$150.00
ELSE IF B=4, THEN
P=$165.00
ELSE IF B=5, THEN
P=$180.00
ELSE IF B=6, THEN
P=$190.00
ELSE IF B >=7, THEN
P=$200.00
END IF
RETURN A, B, C, D, P
Stop"
Please help with corrections or advice, this is one of the early assignments, I am looking through the chapters for help but figured you guys could add to it. Where does EOF fit in? What does the time of day have to do with?
Link to comment
https://www.neowin.net/forum/topic/678254-homework-help/Share on other sites
2 answers to this question
Recommended Posts