Monday, 30 April 2012

Program To Print Salary Using C

#include<stdio.h>
#include<conio.h>
main()
{
clrscr();
printf("enter salary");
scanf("%d",&salary);
if(salary>2000)
{
if(salary>5000)
{
if(salary>10000)
{
printf("A");
}
else
{
printf("B");
}
}
else
{
{
printf("C");
}
else
{
printf("D");
}
}
}
else
{
if(salary>1000)
{
if(salary>1500)
{
printf("E");
}
else
{
printf("F");
}
}
else
{
if(salary>500)
{
printf("G");
}
else
{
printf("H");
}
}
}
getch();
}

No comments:

Post a Comment