Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
Instruction order in C/C++
ternar
Area of a rectangular prism
NETFLIX TERMINADO
Project 4 v0.1
TruncatablePrime
null p null q
apel
C_141204_ValorNumerico
pseudo hw v1
Please log in to post a comment.