Programming Homework Help

Tidewater Community College C Programming IPO Chart Program

 

1.

The principal of a local school wants a program that displays the average number of students per teacher at the school. The principal will enter the number of students enrolled and the number of teachers employed. Complete an IPO chart for this 

problem. Plan the algorithm using a flowchart. Also complete a desk-check table for your algorithm. For the first desk-check, use 1200 and 60 as the number of students and number of teachers, respectively. Then use 2500 and 100.  

1. Enter the number of students and teacher. 2. Calculate the average number of students per teacher by dividing the number of  students by the number of teachers. 3. Display the average number of students per teacher 

 5. Norbert Catering is famous for its roast beef sandwiches. The store’s owner wants a  program that he can use to estimate the number of pounds of roast beef a customer  should purchase, given the desired number of sandwiches and the amount of meat  per sandwich. Typically, one sandwich requires two to three ounces of meat, but  some customers prefer four or five ounces per sandwich. Complete an IPO chart for  this problem. Desk-check the algorithm using 50 as the number of sandwiches and 4  ounces as the amount of meat per sandwich. Then desk-check it using 224 and 2  ounces.

1. Enter the number of sandwiches and amounts of meat per sandwich in ounces. 2. Calculate the number of ounces of roast beef by multiplying the number of  sandwiches and amounts of meat per sandwich in ounces. 3. Calculate the number of pounds of roast beef a customer should purchase by  dividing by 16 the number of ounces of roast beef. 4. Display the number of pounds of roast beef a customer should purchase. 

8. Each time Tania visits the dentist, her dental insurance requires her to pay a $20 copay and 15% of the remaining charge. She wants a program that displays the total  amount she needs to pay, as well as the total amount the insurance should pay.  Complete an IPO chart for this problem. You can assume that the dental charge will  always be at least $20. Desk-check the algorithm using $110 as the dental charge.  Then desk-check it using your own data. 

1. Enter the dental charge. 2. Subtract $20 from the dental charge. 3. Multiplicate the rest of the dental charge by 0.15 4. Calculate the amount of money we need to pay by adding $20 to the rest of the  dental charge 5. Display the amount of money we need to pay