C Saved Program: gifted-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[] ){
double 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 payable iddwweds %10.4lf",total_tax);
}
 else if (37000<=income<80000)
 {
  tax= income*(32.5/100.0);
 healthcare = income* HEALTHTAX;
 total_tax = healthcare + tax;
 printf("thwwwwwwe tax payable is %10.4lf",total_tax);
 }
 else if (80000<=income<180000)
 {
  tax= income*(37.0/100.0);
 healthcare = income* HEALTHTAX;
 total_tax = healthcare + tax;
 printf("the twwwwax payable nm m is %10.4lf",total_tax);
 }
 else 
 {
 tax= income*(45.0/100.0);
 healthcare = income* HEALTHTAX;
 total_tax = healthcare + tax;
 printf("the tax payable is:: %10.4f",total_tax);
 }
     

     


 return 0;

}
Execute

Output

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

Inputs