Question: Construct a C program, cha and coins needed to make change for a particular purchase. The cost of the itern Change Lab nge.c, which computes
Construct a C program, cha and coins needed to make change for a particular purchase. The cost of the itern Change Lab nge.c, which computes the minimum number of bille your program using assignment statements rather than input into the program during program runtime. Your program should indicate how many bills and coins of each denomination are needed for the change. You should make use of the following denominations: 1.17 and the amount tendered is $100.00. These values should be built into Bills: twenty, ten, five, one Coins: quarter, dime, nickel, penny Your program should make use of integer division as well as the modulus operator ( ) . Do not use subtraction in place of the modulus operator! Note that it will be easier to convert the cost and amount tendered into pennies so you can work with integers rather than doubles. Use the following guidelines to develop your program: Declare your variables with appropriate data types. Assign values to your variables. Perform your calculations Generate appropriate output. Points to Remember: Make sure you are creating a C program and not a C++ program. The .c suffix to your source code will invoke the C compiler while the cpp suffix will invoke the C++ compiler. As this is a clas source code uses the .c suffix. s in C and not C++, please make sure your You should not be using any is a variable declared outside of main () global variables in your program. A global variable Focus on Fundamentals of Programming with C T-Mobile 1:35 PM Pop Project 1 Instru... C "Pop" Project #1 Purpose: Design, create, edit, debug and compile a simple C program. Scenario You want to calculate how many pounds of fertilizer you will need to buy to supply 1.0 pounds of Nitrogen per 1000 square feet to your lawn. The first number of the three number entries on the fertilizer bag represents what percentage of the fertilizer is Nitrogen. (For example a 20-10-10 fertilizer has 20% Nitrogen). Inputs: 1) The length of your lawn in feet 2) The width of your lawn in feet 3) The percentage of Nitrogen in the fertilizer you intend to use 1 Calculate the number of square feet in your lawn. 2. Divide the number of square feet by 1000 to get the number of pounds of Nitrogen you need. by dividing by 100. number of pounds of Nitrogen you need by the percentage of Nitrogen 3. Convert the percentage number from the input to a decimal number 4. Calculate the number of pounds of fertilizer needed by dividing the in the fertilizer Output: Display a nicely worded message that indicates how many pounds of fertilizer you will need with 2 decimal places. Submit: Zipped solution folder Dashboard Calendar To Do Notifications Inbox
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
