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
printing numbers without using loop
hwkpractice
1.5 No. of Processors
B_141121_fibonacci
Deadlock
String copy
DDD
pthread_monte_carlo_pi.c
Pregunta 3 de registros
Assignment 10