C Program to calculate gross salary of employee

C Program to calculate gross salary of employee:
If you are using any software then below program will not give an error, but if you are using TURBO C then you have to make some changes like: void main() and some function like clrscr() or getch().

#include<stdio.h>

main()
{
   int gross_salary, basic, da, ta;

   printf("Enter basic salary : ");
   scanf("%d",&basic);

   da=(10*basic)/100;
   ta=(12*basic)/100;

   gross_salary=basic+da+ta;

   printf("\nGross salary : %d",gross_salary);
}

OUTPUT:

Enter basic salary : 25000

Gross salary : 30500

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.