Ali's Gross salary

Ali’s basic salary is input through the keyboard.His dearnees allaowance is 40% of his basic salary,and house rent allaowance is 20% of his basic salary .Write a program to calculate his gross salary.

#include
#include
void main(void)
{
clrscr();
int a,s,d,f,r;
printf(“Enter the Basic Salary:”);
scanf(“%d”,&a);
s=(a*40)/100;
d=(a*20)/100;
r=a+s+d;
printf(“The Gross Salary is %d”,r);
getch();
}

Comments

Popular posts from this blog

Tip of the Day # 13

Governor Generals of Pakistan