The following question is related to C programming (struct and function)    Task-1: Suppose you and your friends go to have breakfast in a restaurant. Each of you orders Paratha, Vegetable, and Mineral Water. Treat each of the ordered items as structures and each of the structures will have two properties which are: quantity and unit price. Each property of the structure will be taken as input from the user. After taking all the input

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 20PE: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making...
icon
Related questions
Question

The following question is related to C programming (struct and function) 

 

Task-1:

Suppose you and your friends go to have breakfast in a restaurant. Each of you orders Paratha, Vegetable, and Mineral Water. Treat each of the ordered items as structures and each of the structures will have two properties which are: quantity and unit price. Each property of the structure will be taken as input from the user. After taking all the inputs calculate what is the total bill and also, take input from the user on how many people are there in total. Lastly calculate how much each person will have to pay and print it (Note: This value will be a float).

Sample Input:

Quantity Of Paratha: 25

Unit Price: 10

Quantity Of Vegetables: 5

Unit Price: 20

Quantity Of Mineral Water: 20

Unit Price: 20

Number of People: 6

Sample Output:

Individual people will pay: 125.00 tk

Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Concept of pointer parameter
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning