18. You found an exciting summer job for five weeks. It pays, say, $15.50 your s
ID: 3850952 • Letter: 1
Question
18. You found an exciting summer job for five weeks. It pays, say, $15.50 your summer job per hour. Suppose that the total tax you spend 10% of your net income is 14%. paying the taxes, pay ter for the next school accessories income to buy new clothes and other buying clothes and school and 1% to buy school supplies A money buy savings bonds. supplies, you use 25 the remaining to dollar you spend to buy savings bonds, your parents spend $0.50 to buy additional savings bonds for you. Write a program that prompts the user to enter the pay rate for an hour and the number of hours you worked each week. The program then outputs the followingExplanation / Answer
#include <stdio.h>
void main()
{
float hourPerWeek[5], payRate, totalIncome = 1, taxPaid = 0;
int i;
Printf("Pay rate: $");
scanf("%f",&payRate);
printf("Weekly Hour Worked: ");
for(i=0;i<5;i++)
{
scanf("%f",&hourPerWeek[i]);
totalIncome=totalIncome*hourPerWeek[i];
}
totalIncome=totalIncome*payRate;
taxPaid = (0.14*totalIncome);
Printf("Summer Job Income $%.2f",totalIncome);
prinf("Taxes $%.2f",taxPaid);
printf("Income After Taxes $%.2f",(totalIncome-taxPaid));
totalIncome = totalIncome - taxPaid; /*Amount after taxes */
printf("Clothes And Accessories $%.2f",(0.1*totalIncome)) ;
totalIncome = 0.90*totalIncome;
printf("School Supplies $%.2f",(0.01*totalIncome)) ;
totalIncome = 0.99*totalIncome;
printf("Remaining Money $%.2f", totalIncome);
printf("Amount Spent on Saving Bonds $%.2f", (.25*totalIncome));
printf("Amount Parents Spend on Bonds $%.2f",(0.25*totalIncome)/(0.5));
return ;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.