C Saved Program: beautiful-terrain

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


#include <stdio.h>
#define HEALTHTAX .015
int main(int argc,char *argv[]  ){
float income,tax,healthcare,total_tax;
scanf("%f", &income);

if (18200<=income && income<37000)
{
 tax= income*(19.0/100.0);
 healthcare = income* HEALTHTAX;
 total_tax = healthcare + tax;
 printf("the tax payadble is %10.4lf",total_tax);
}
 else if (37000<=income && income<80000) 
 {
  tax= income*(32.5/100.0);
 healthcare = income* HEALTHTAX;
 total_tax = healthcare + tax;
 printf("the tax payabldfe is %10.4lf",total_tax);
 }
 else if (income>=80000 && income<180000)
 {
    
  tax= income*0.37;
 healthcare = income* HEALTHTAX;
 total_tax = healthcare + tax;
 printf("the tax p33ayable is %10.2lf",total_tax);
 }
 else 
 {
 tax= income*(45.0/100.0);
 healthcare = income* HEALTHTAX;
 total_tax = healthcare + tax;
 printf("the tax payablergt is %10.4lf",total_tax);
 }
     

 return 0;

}
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs