Question

Problem description: Design the logic in pseudocode for a family membership management program to be used...


Problem description:

Design the logic in pseudocode for a family membership management program to be used at Sweaty Time Gym. Monthly membership fees are $30 per adult and $10 per child. When the family first signs up for membership, a one-time activation fee of $50 (for the entire family, not per person) is charged. The program must allow the user to enter the number of adults and number of children in the family, and output the totals for adults and children, and the total amount owed for the first month after including the activation fee.

Instructions
  1. Read the problem description
  2. Follow the instructions under each question to write the relevant lines of code
  3. Click Submit when done

Homework Answers

Answer #1

Dear Learner,

Here is the pseudocode for the question

BEGIN:

1. Ask the user to enter the number of adults in their family and store the value in n_adults

n_adults .= read_input

2. Ask the user to enter the number of children in their family and store the value in n_child

n_child = read_input

3. Ask the user if they are registering for the first time

registering = read_input

4. if registering = true continue, else jump to step 6

5. total_fees = 30*n_adults + 10*n_child + 50, jump to 7

6. total_fees = 30*n_adults + 10*n_child

7. Display n_adults,n_child,total_fees

END

Here is a code in C for example

#include<stdio.h>
#include<conio.h>
main()
{
    int n_adults, n_child,total_fees,registering;
    printf("Enter the number of adults:");
    scanf("%d",&n_adults); //taking user input for number of adults
    printf("\nEnter the number of children");
    scanf("%d",&n_child); //taking user input for number of children
    printf("\nRegistering for the first time? (1 for yes |||| 0 for no)");
    scanf("%d",&registering);   //asking f the user is registering for the first time
   if(registering == 1)
    {
        total_fees = n_adults*30 + n_child*10 + 50;
    }
    else
        total_fees = n_adults*30 + n_child*10;
   
    //displaying the final results
    printf("\nTotal number of adults = %d\nTotal number of children = %d\nTotal Amount = %d",n_adults,n_child,total_fees);
   
}

SAMPLE OUTPUT :

I hope I have explained the question the way you were expecting. If you still have any doubts or want any other explanation, feel free to ask us in the comment section.

Please leave a like if this was helpful.

Thanks,

Happy Studying.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Problem description: Design the logic in pseudocode for a rental management program at Warm Buggy Mobile...
Problem description: Design the logic in pseudocode for a rental management program at Warm Buggy Mobile Home Park. Each month, tenants are charged $0.20 per gallon for water, $2 a month for trash pickup, $15 per car for parking, $5 for maintenance, and the rent for their apartment itself. The program must allow the user to enter the home number, the monthly rent, the number of gallons of water used, and the number of cars owned by the tenant(s), and...
comment on 2 things you learned from this chapter of the Cognitive development ece 124 chapter...
comment on 2 things you learned from this chapter of the Cognitive development ece 124 chapter 9 Piaget -Preoperational intelligence • Cognitive development between the ages of about 2 and 6 • Includes language and imagination • Suggests logical, operational thinking is not yet possible at this stage Piaget: Symbolic Thought • Major accomplishment of preoperational intelligence • Allows a child to think symbolically, including understanding that words can refer to things not seen and that an item can symbolize...
Instructions: Please complete the 2017 federal income tax return for Magdalena Schmitz. Ignore the requirement to...
Instructions: Please complete the 2017 federal income tax return for Magdalena Schmitz. Ignore the requirement to attach the form(s) W-2 to the front page of the Form 1040. If required information is missing, use reasonable assumptions to fill in the gaps. Make sure you include all necessary schedules and tax forms. Magdalena Schmitz has undergone some major changes in her life recently. In 2015, at the age of 46, her husband, Roger, passed away. Magdalena has not remarried as of...
QUESTION 1 ? What is the relationship between family dysfunction and schizophrenia? a. ?Research has substantiated...
QUESTION 1 ? What is the relationship between family dysfunction and schizophrenia? a. ?Research has substantiated a link between family dysfunction and schizophrenia but can't say which causes the other. b. ?Family dysfunction is a major causative factor for schizophrenia. c. ?Research has failed to substantiate a direct causal link between family dysfunction and schizophrenia. d. ?Family dysfunction plays a minor role in developing schizophrenia. 1.00000 points    QUESTION 2 ? Chuck has no life plan; he simply lives from...
read Seasons of Love chapter:measuring a child's life after suicide. please answer the questions : reflect...
read Seasons of Love chapter:measuring a child's life after suicide. please answer the questions : reflect on what happens to the families when there is a suicide in the family, based on the Seasons of Love chapter...how should people be told? What details are best left unshared? below is the story These theories may have a certain face-validity, but they often neglect environmental or contextual factors that are innate to answering the question of “why” a person might engage in...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...
In narrative essay format, I want you to address a business/organization case study using multiple concepts...
In narrative essay format, I want you to address a business/organization case study using multiple concepts from class. The case question and case text begin on page 5 of this document. You need to demonstrate their best understanding of management and organizational behavior theory, and the application of those ideas to improve the understanding of various issues. You need to clearly identify at least 3 distinct, substantive issues. For each issue you need to 1), identify evidence from the case...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
Mattel Responds to Ethical Challenges Business Ethics This case was written by Debbie Thorne, John Fraedrich,...
Mattel Responds to Ethical Challenges Business Ethics This case was written by Debbie Thorne, John Fraedrich, O. C. Ferrell, and Jennifer Jackson, with the editorial assistance of Jennifer Sawayda. This case was developed for classroom discussion rather than to illustrate either effective or ineffective handling of an administrative, ethical, or legal discussion by management. All sources used for this case were obtained through publicly available material. Mattel, Inc. is a world leader in the design, manufacture, and marketing of family...
Question: A Nurse Practitioner educator who coordinates the staff education on an oncology unit is conducting...
Question: A Nurse Practitioner educator who coordinates the staff education on an oncology unit is conducting an inservice on … therapies. What potential benefit of … therapies should the nurse highlight in this education session? NURS 6521N 55 Question: Laboratory testing has confirmed that a patient has chloroquine-resistant malaria and the patient’s physician has … quinine along with an adjunctive drug. The nurse should question the physician’s order if the patient has a history of Question: When planning care for...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT