- Joined
- Nov 3, 2016
- Posts
- 5,852
- Solutions
- 98
- Reaction
- 39,577
- Points
- 5,374
- Age
- 21
Baka pwede matulungan ako nito mag code sa C salamat
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
#include <stdio.h>
#include <stdlib.h>
int main()
{
const float tax = 0.14, spend = 0.1, supplies = 0.01, savings = 0.25, parentspend = 0.5;
float hours, hourrate, moneyspent, schoolsupplies, savingsbonds, parentsavingsbonds, remaining;
float incomeb4tax, incomeaftertax;
printf("Ente hour rate: ");
scanf("%f", &hourrate);
printf("Ente number of hours work: ");
scanf("%f", &hours);
incomeb4tax = hourrate * hours;
printf("\nYour income before taxes from your summer job is %.2f. \n", incomeb4tax);
incomeaftertax = incomeb4tax - (incomeb4tax * tax);
printf("Your income after taxes from your summer job is %.2f. \n", incomeaftertax);
moneyspent = incomeaftertax * spend;
printf("The money you spend on clothes and the other accessories is %.2f. \n", moneyspent);
schoolsupplies = incomeaftertax * supplies;
printf("The money you spend in school supplies is %.2f. \n", schoolsupplies);
savingsbonds = incomeaftertax - (moneyspent + schoolsupplies);
remaining = savingsbonds * savings;
printf("The money you spend buy savings bonds is %.2f. \n", remaining);
parentsavingsbonds = remaining * parentspend;
printf("The money your parent spend to buy additional savings bonds for you is %.2f. \n\n", parentsavingsbonds);
system("pause");
return 0;
}