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
Project 5 v0.1
Command Expressions in Gnu C
C_141210_Funciones
project 5 v.075
variable arguments 2
SOLUCIONES_TRABAJO_05
to upper case string
18BCE2182 LAB FAT-2(A)-(i)
string_ptr_to_fct_param
recursive