Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Incometax problem v0.1
//gcc 5.4.0 #include <stdio.h> //We would like to write a C program to calculate the income tax of the employees in an organization according the following criteria: //- The income tax is zero = 0 if income less than or equal 10,000 //- The income tax is 10% if the income is less than 50,000. Otherwise, the income tax is 20% if the income is greater than 50000 and less than 99,9999 //- For an income greater than or equal 100000, the tax is 30%. START PROGRAM double income double incometax PRINT "Please Input:\n Name: \n Income:\n" READ income if (income<=10000){ incometax=0; PRINT "Your income tax is %lf",incometax); } else if (income>=10000&&income<=50000){ incometax=income*.1; PRINT "Your income tax is $%lf",incometax); } else if (income>=50000&&income<=999999){ incometax=income*.2; PRINT "Your income tax is $%lf",incometax); } else{ incometax=income*.3; PRINT "Your income tax is $%lf",incometax); } int main(void) { printf("Hello, world!\n"); return 0; }
run
|
edit
|
history
|
help
0
Print hostname
strcpy template
Lab 7 blackjack v1.0
Pozdravljeni v mali soli C.
KN king Array ques
strcopy
Lab 7 v1.0
Official Hello World
Nitheesh
11