Question

A Private Poly Clinic in Oman wish to develop software to automate their Patient Monitoring system...

A Private Poly Clinic in Oman wish to develop software to automate their Patient Monitoring system for storing the details of the patients visited the clinic. Develop a system to meet the following requirements:

  1. The clinic wish to give 15% discount on the fees to be paid by the patients whose age is above 60. Develop an algorithm, flow chart and write a C program to read age of the patient and calculate the fees after the discount by writing a function with argument. Display the result with appropriate statements.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Algorithm for the above problem:

Take age as input from the user.

If age is greater than 60:

Subtract 15% of fees from original fee and return the fee

else i.e age is less than 60:

return the original fees.

Full Working C Code:

#include <stdio.h>
/*
Let initial fees be Rs 1000
*/
int fees = 1000;
//Method that returns the effective fees for the patient based on his age
int calculateFees(int age)
{
if(age >= 60)
{
//If age exceeds 60 the returns discounted fee
return fees - (0.15 * fees);
}
else
{
return fees;
}
}
int main() {
//Take age as input from user
   printf("What is the age of the patient?");
   int age;
   scanf("%d",&age);
   //Display the fee effective to the patient
   printf("\nEffective fees is : %d",calculateFees(age));
   return 0;
}

Output:

Run 1:

What is the age of the patient?

Input: 23

Effective fees is : 1000

Run 2:

What is the age of the patient?

Input: 67

Effective fees is : 850

Flowchart:

Add a comment
Know the answer?
Add Answer to:
A Private Poly Clinic in Oman wish to develop software to automate their Patient Monitoring system...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A Private Poly Clinic in City wish to develop software to automate their Patient Monitoring system...

    A Private Poly Clinic in City wish to develop software to automate their Patient Monitoring system for storing the details of the patients visited the clinic. Develop a system to meet the following requirements: Patient Id Fees in (OMR)       Gender P001 15 M P002 10 F P003 20 M P004 8 F P005 12 M The clinic wish to give 15% discount on the fees to be paid by the patients whose age is above 60. Develop an algorithm,...

  • Use c program to: The clinic wish to give 15% discount on the fees to be...

    Use c program to: The clinic wish to give 15% discount on the fees to be paid by the patients whose age is above 60. Develop an algorithm, flow chart and write a C program to read age of the patient and calculate the fees after the discount by writing a function with argument. Display the result with appropriate statements.

  • please Identify the key points and main thesis of the article 2. Describe the skills you...

    please Identify the key points and main thesis of the article 2. Describe the skills you will need to develop to manage the hospital of the future. use critical analysis doing these questions Suggestion for writing assignmemnt make believe the reader has never read the article -what are the key points you would want the reader to know in order to understand the hospital of the future. In addition, managers, executives do not have time to read--so again what key...

  • Using the book, write another paragraph or two: write 170 words: Q: Compare the assumptions of...

    Using the book, write another paragraph or two: write 170 words: Q: Compare the assumptions of physician-centered and collaborative communication. How is the caregiver’s role different in each model? How is the patient’s role different? Answer: Physical-centered communication involves the specialists taking control of the conversation. They decide on the topics of discussion and when to end the process. The patient responds to the issues raised by the caregiver and acts accordingly. On the other hand, Collaborative communication involves a...

  • SYNOPSIS The product manager for coffee development at Kraft Canada must decide whether to introduce the...

    SYNOPSIS The product manager for coffee development at Kraft Canada must decide whether to introduce the company's new line of single-serve coffee pods or to await results from the product's launch in the United States. Key strategic decisions include choosing the target market to focus on and determining the value proposition to emphasize. Important questions are also raised in regard to how the new product should be branded, the flavors to offer, whether Kraft should use traditional distribution channels or...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT