Write a tax calculation program using following condition.
1. if amount>=11500 then tax is 150 tk.
2. if amount>=8000 then tax is 100 tk.
3. Others wish tax is 0 tk
Program:
#include<stdio.h>
main(){
int amount,tax;
printf("Enter amount = ");
scanf("%d", &amount);
if(amount>=11500)
tax=150;
else if(amount>=8000)
tax=100;
else
tax=0;
printf("Your tax = %d", tax);
}
1. if amount>=11500 then tax is 150 tk.
2. if amount>=8000 then tax is 100 tk.
3. Others wish tax is 0 tk
Program:
#include<stdio.h>
main(){
int amount,tax;
printf("Enter amount = ");
scanf("%d", &amount);
if(amount>=11500)
tax=150;
else if(amount>=8000)
tax=100;
else
tax=0;
printf("Your tax = %d", tax);
}