Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- #include <ctype.h>
- #include <string.h>
- #include <stdbool.h>
- int main()
- {
- float tax, income;
- printf("Enter your income: ");
- scanf("%f", &income);
- if(income < 750){
- tax = (1/100) * income;
- }else if(income >= 750 && income <2250){
- tax = 7.5 + ((2/100) * income);
- }else if(income >=2250 && income < 3750){
- tax = 37.5 + ((3/100) * income);
- }else if(income>=3750 && income < 5250){
- tax = 82.5 + ((4/100) * income);
- }else if(income>=5250 && income<=7000){
- tax = 142.5 + ((5/100) * income);
- }else if(income > 7000){
- tax = 230 + ((6/100) * income);
- }
- printf("\n\nThe tax to be paid is $ %.2f.", tax);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement