C/C+= program to calculate Income tax

\\ program to calculate income tax 

 #include <stdio.h>

int main(){
    int sal, cusno;
    printf("Enter the customer number: ");
    scanf("%d", &cusno);
    printf("Enter your salary: ");
    scanf("%d", &sal);
    if(sal<250000){
        printf("Net tax is 0");
    }
    else if (sal>250000 && sal<500000)
    {
        printf("Net tax is %d.", (sal-250000)*5/100);
    }
    else if (sal>=500000 && sal<1000000)
    {
        printf("Net tax is %d.", (sal-500000)*20/100);
    }
    else{
        printf("Net tax is %d.", (sal-1000000)*30/100);
    }
    return 0;
   

    }

Comments

Post a Comment

Popular posts from this blog

Site to calculate electricity bill using HTML, CSS and Java Script

Functions and recrusion.

Quick calculator using HTML,CSS and Java Script.