AnkitWebLogic

Ans 11. WAP to input working hour of an employee and find per day salary 1

#include<stdio.h>
int main()
{
    int h, s;
    printf("Enter Working Hours: ");
    scanf("%d",&h);
    if(h<=8)
    {
        s=h*600;
    }
    else if(h<=12)
    {
        s=4800+(h-8)*400;
    }
    else if(h<=16)
    {
        s=4800+1600+(h-12)*300;
    }
    else
    {
        s=4800+1600+1200+(h-16)*200;
    }
    printf("Total Day Salary is Rs %d",s);
    return 0;
}
Enter Working Hours: 13
Total Day Salary is Rs 6700

Advertisement