You have an grocery store and you need a program that helps you read the price of the products for each customer. Each customer has three products. Minimum price for each product is 0, and the max price for each product is 77.77. Use a structure called customer. Give the structure 4 members, one for customer ID (it should be an integer), and three for the prices of the products (they should be a decimals). Then, in main, ask for how many customers you will be given the total price of its products. Then, create an array of structures of type Customer. Then, also in main, iterate through each one of them and scan the customers ID and prices. Finally, also in main, print out the customers ID, followed by the final price(the final price is the sum of all three prices). Don't chek if the user inputted a price between 0 and 77.77. You assume the user will always input the price within this range. Everything can be done in main. Output: How many customers will you be helping? 2 Customer 1 ID= 2198262237 Price product one: 15.23 Price product two: 18.54 Price product three: 30.37 Customer 2 ID= 667264646 Price product one: 50.31 Price product two: 42.10 Price product three: 5.39 Customer 1 ID: 2198262237 Total price: 64.14 Customer 2 ID: 667264646 Total price: 97.80||

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Topic Video
Question

Programing C

 

You have an grocery store and you need a program that helps you read the price of the products for each
customer. Each customer has three products. Minimum price for each product is 0, and the max price for each
product is 77.77. Use a structure called customer. Give the structure 4 members, one for customer ID (it
should be an integer), and three for the prices of the products (they should be a decimals). Then, in main, ask
for how many customers you will be given the total price of its products. Then, create an array of structures of
type Customer. Then, also in main, iterate through each one of them and scan the customers ID and prices.
Finally, also in main, print out the customers ID, followed by the final price(the final price is the sum of all
three prices). Don't chek if the user inputted a price between 0 and 77.77. You assume the user will always
input the price within this range. Everything can be done in main.
Output:
How many customers will you be helping? 2
Customer 1
ID= 2198262237
Price product one: 15.23
Price product two: 18.54
Price product three: 30.37
Customer 2
ID= 667264646
Price product one: 50.31
Price product two: 42.10
Price product three: 5.39
Customer 1
ID: 2198262237
Total price: 64.14
Customer 2
ID: 667264646
Total price: 97.80||
Transcribed Image Text:You have an grocery store and you need a program that helps you read the price of the products for each customer. Each customer has three products. Minimum price for each product is 0, and the max price for each product is 77.77. Use a structure called customer. Give the structure 4 members, one for customer ID (it should be an integer), and three for the prices of the products (they should be a decimals). Then, in main, ask for how many customers you will be given the total price of its products. Then, create an array of structures of type Customer. Then, also in main, iterate through each one of them and scan the customers ID and prices. Finally, also in main, print out the customers ID, followed by the final price(the final price is the sum of all three prices). Don't chek if the user inputted a price between 0 and 77.77. You assume the user will always input the price within this range. Everything can be done in main. Output: How many customers will you be helping? 2 Customer 1 ID= 2198262237 Price product one: 15.23 Price product two: 18.54 Price product three: 30.37 Customer 2 ID= 667264646 Price product one: 50.31 Price product two: 42.10 Price product three: 5.39 Customer 1 ID: 2198262237 Total price: 64.14 Customer 2 ID: 667264646 Total price: 97.80||
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Instruction Format
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education