Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help (C Programming). I almost have it done but I keep getting failed. Thank you Ill definitely rate up This diff is colored to

Please help (C Programming). I almost have it done but I keep getting failed.
Thank you Ill definitely rate up
image text in transcribed
image text in transcribed
image text in transcribed
This diff is colored to make it clear what parts of the output are wrong. Green indicates things in the correct output that you are missing, red indicates things in your output that shouldn't be there The character refers to newlines, so the green character refers a new line you are missing in your output and the red refers to a new line you need to remove from your output. 1 Enter the per hourl pay rate: 2 Enter the number of hours worked for week 1: Enter the number of hours worked for week 2: Enter the number of hours worked for week 3: Enter the number of hours worked for week 4: Enter the number of hours worked for week 5: $ 25.00 1 200.00 Hourly Rate Total Hours Worked | $ 15000.00 12 | $ 864300.00 IS86430.00 1 $ 8 43.600 | $ 19156.375 I$95478.688 Total Income before tax Net Income Money spent on clothes and other accessories Money spent on school supplies Money spent on savings Money spent by parents on additional savings #include int main() float hourlyRate, hoursWorked, income, netIncome, moneyClothes, moneySchool, moneyParents savings; printf("Enter the hourly rate : "); scanf("%f",&hourlyRate) printf(" Enter the number of hours worked : "); scanf("%f",&hoursWorked) income = hoursworked hourlyRate; netIncome = income - income *0.14; moneyClothes = netIncomexo.10; moneySchool = netIncome * 0.01; savings = (net Income - moneyClothes - money School) 0.25 moneyParents = savings *0.5; printf(" ------ --------------------------------------------1"); printf(" $ %.2f $-205 l", hourlyRate, "Hourly Rate"); printf(" %.2f %-20 ", hoursworked, "Total Hours Worked") printf(" --- --1"); printf(" | $ %.2f $-205 I", income, "Total Income before tax"); printf(" $ %.2f | 9-205 ", netIncome, "Net Income"); printf(" $ %.2f | %-205 (", moneyClothes, "Money spent on clothes and other accessories") printf(" $ %.2f %-205 l", moneySchool, "Money spent on school supplies") printf(" $ %.2f | %-205 ". savings, "Money spent on savings") printf(" $ %.2f | %-205 l", moneyParents, "Money spent by parents on additional savings") printf(" |----------- -------1"); return 0; DESCRIPTION You found an exciting summer job for five weeks. Suppose that the total tax you pay on your summer job income is 14%. After paying the taxes, you spend: You spend 10% of your net income to buy new clothes and other accessories for the next school year You 1% to buy school supplies AFTER buying clothes and school supplies, you save 25% of the remaining money For each dollar you save, your parents add $0.50 additional savings Write a program that prompts the user to enter the pay rate for an hour and the number of hours you worked each week. For Example, If you earned $10.00/hour and worked 10 hours per week.... the program should output the following: ---------- ------------------------------ --- -- -------- --- | $ 10.00 | Hourly Rate 50.00 Total Hours Worked -- -------- - --- --------------------- --------- | $ 500.00 Total Income before tax | $ 430.00 Net Income | $ 43.00 | Money spent on clothes and other accessories | $ 4.30 | Money spent on school supplies | $95.67 Money spent on savings | $ 47.84 | Money spent by parents on additional savings | |---------- -- -------- REQUIREMENT: Use printf format descriptors to format the rows of the table

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions