#include <stdio.h>

int main() {
    int income,tax=0;
    printf("Enter income:\n");
    scanf("%d",&income);
    if(income>250000 && income<500000){
        tax=0.05*(income-250000);
    }
    else if(income>500000 && income<100000){
        tax=0.05*(500000-250000) +0.2*(income-500000);
    }
    else {
        tax=0.05*(500000-250000)+0.2*(100000-500000)+0.3*(income-100000);    
    }
    printf("the total tax you need to pay is %d",tax);
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: