Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Assignment 5 part 2 v2
#include <stdio.h> int main (void) { double income; //declare variables income taxBurden double taxBurden; //ask for income and then scan for income scanf("%lf", &income); //tell user what their income is printf("Please print the income you earned this year\n"); printf("You earned $%lf this year\n", income); // if income is greater than zero than times it by .1 for taxBurden // if income is greater than 50000 than times it by .2 for taxBurden // if income is greater than 100000 than times it by .3 for taxBurden // if income is less than zero than tell user they have entered a negative number. //print results of taxBurden if (income>=0) { if (income>50000) { if (income>100000) { if (income>=1000000){ taxBurden=income*.3; printf("Your tax burden is $%lf\n", taxBurden); } else {taxBurden=income*.2; printf("Your tax burden is $%lf", taxBurden);}} else { taxBurden=income*.1; printf("Your tax burden is $%lf", taxBurden);}} else printf("Your tax burden is $0");} else {printf("You have entered a negative number, please try again"); } }
run
|
edit
|
history
|
help
0
Sunday assignment v2
PRIMER AVANCE DE NETFLIX
1.4 Thread IDs
strend
18BCE2182 ASSESS_2 Q1
A_141212_IntercambiarValores
json string formatter
18BCE2182 ASSESS_3 Q4
piesa perdida
2.1.3 Sum of squares of first hundred natural numbers with different cores