donmike25

ecp1016 tutorial 3(1)

Jun 27th, 2013
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include<stdio.h>
  2. int main ()
  3. {
  4.  
  5. int income;
  6. float tax;
  7. printf("Enter Income:\n",income);
  8. scanf("%d",&income);
  9.  
  10. if (income < 2500);
  11. {
  12.   printf ("No Tax\n",tax);
  13. }
  14.  
  15. else if(income=>2500 && income <3500);
  16. {
  17.     tax=450;
  18.     printf("Tax: %f\n",tax);
  19. }
  20.  
  21. else if (income >= 3500 && income <=4500);
  22. {
  23.     tax=450+(10/100);
  24.     printf("Tax: %f\n",tax);
  25. }
  26.  
  27. else if(income>6000);
  28. {
  29.     tax=600+(20/100);
  30.     printf("Tax:%f\n",tax);
  31. }
  32. return 0;
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment