Programming C Create a program that tells you how much money you have left after buying furniture for your home. In main, ask for the initial amount of money. Then, send this value to function home. In function home, ask the user repeatedly for the expenses. Keep asking until the user inputs zero. When done, also in function home, print out the result (the money that the user has left). Output: How much money do you have? 20000.00 List the prices of the thing you just bought: 355.54 45.54 109.45 32.55 839.32 599.99 The money you have left: 18017.61
Programming C Create a program that tells you how much money you have left after buying furniture for your home. In main, ask for the initial amount of money. Then, send this value to function home. In function home, ask the user repeatedly for the expenses. Keep asking until the user inputs zero. When done, also in function home, print out the result (the money that the user has left). Output: How much money do you have? 20000.00 List the prices of the thing you just bought: 355.54 45.54 109.45 32.55 839.32 599.99 The money you have left: 18017.61
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
Related questions
Question

Transcribed Image Text:Programming C
Create a program that tells you how much money you have left after buying furniture for your home.
In main, ask for the initial amount of money.
Then, send this value to function home. In function home, ask the user repeatedly for the expenses.
Keep asking until the user inputs zero.
When done, also in function home, print out the result (the money that the user has left).
Output:
How much money do you have?
20000.00
List the prices of the thing you just bought:
355.54
45.54
109.45
32.55
839.32
599.99
The money you have left: 18017.61
Expert Solution

Step 1
C program to show how much money you have left after buying furniture for your home.
Create a variable to store the initial Amount.
prompt the user to enter the initial Amount. Store the initial amount in the variable.
Call the function named home with the initial Amount.
In the function,
Create a variable to store the expenses.
prompt the user to enter the expenses.
Using the while loop gets the expense amount from the user until the user enters 0.
Store the expenses in the variable.
Subtract the expenses from the initial amount.
Display the money left after the expenses.
Step by step
Solved in 2 steps with 1 images

Recommended textbooks for you

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education