calculate the health allowance, house rent, and gross salary

 

Here ,code of the calculation health allowance,house rent,and gross salary.For understanding this code you should learn first following topics.

output

input


//caluculating health allownce,house rent ,Gross salary  

Code

#include <stdio.h>


int main()

{

int x = 0, y = 0, z = 0,g=0;  // variable declaration 

printf("Enter the Basic Salary\n");

scanf("   %d", &x);  // user input the basic salary

printf("                      Salary Details                     \n");

y = (40 * x) / 100;  //to calculate the health allownce

printf("     Basic Salary:                             Rs%d\n",x);

printf("     Health Allownce:                          Rs%d\n", y);

z = (20 * x) / 100;  //to calculate  the house rent

printf("     House Rent:                               Rs%d\n", z);

g = x + y + z;      //to calculate the gross salary

printf("  _______________________________________________________________\n");

printf("     Gross Salary                              Rs%d\n", g); //the gross salary will print

getchar;

return 0;

}



Comments

Popular posts from this blog

Diferrence between flutter and react native

Flutter Widgets

Flutter layout