If the basic salary less than Rupees One thousand five hundred then house rent allowances is ten percent of basic salary and dearness allowances is ninety percent of basic salary.
If the basic salary is either equal to or above Rupees One thousand five hundred then house rent allowances is five hundred rupees and dearness allowances is ninety eight percent of basic salary.
If the employee's salary is input through the keyboard write a program to find his gross salary.
#include <stdio.h>
#include <conio.h>
void main( )
{
float bs, gs, da, hra;
clrscr ( );
printf ("\n Enter basic salary.....:"); scanf ("%f",&bs);
if ( bs < 1500)
{
hra = bs * 10/100;
da = bs * 90/100;
}
else
{
hra = 500;
da = bs * 98/100;
}
gs = bs + hra + da;
printf ("\n Gross salary.......: Rs.%f", gs);
getch ( );
}
www.crystalcomputercentre.org
If the basic salary is either equal to or above Rupees One thousand five hundred then house rent allowances is five hundred rupees and dearness allowances is ninety eight percent of basic salary.
If the employee's salary is input through the keyboard write a program to find his gross salary.
#include <stdio.h>
#include <conio.h>
void main( )
{
float bs, gs, da, hra;
clrscr ( );
printf ("\n Enter basic salary.....:"); scanf ("%f",&bs);
if ( bs < 1500)
{
hra = bs * 10/100;
da = bs * 90/100;
}
else
{
hra = 500;
da = bs * 98/100;
}
gs = bs + hra + da;
printf ("\n Gross salary.......: Rs.%f", gs);
getch ( );
}
www.crystalcomputercentre.org
No comments:
Post a Comment