Thursday, July 21, 2011

A C program that can calculate gross salary

This is the program to find out the gross income of an employee by taking input of his different data and making the formula for finding it.

C Program:-



#include<stdio.h>
#include<conio.h>
void main(void)
{
clrscr();
int b_salery,inc,allowence,bonus;
printf("enter your basic salery=\n");
scanf("%d",&b_salery);
printf("enter your bonus=/n");
scanf("%d",&bonus);
printf("enter yourincrement=/n");
scanf("%d",&inc);
printf("enter your allowence=/n");
scanf("%d",&allowence);
b_salery=b_salery+inc+allowence+bonus;
printf("Your gross salery = %d",b_salery);
getch();
}

NOTE:-
            As the output of this program is completely understandable as i mentioned in a lot of recent posts so i will not show the output.just try it on your compiler and see what happen.

No comments:

Post a Comment