Friday, August 29, 2014

Hassan’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary


Code

#include<stdio.h>
int main()
{
int a,c;

printf ("Enter Hassan's basic salary: ");
scanf ("%d",&a);

c = (a/100) * 60;

printf ("\nGross Salary= %d",c);

printf ("\n\npress any key to close.");

getch ();
return 0;
}

Output

gross salary C Language

No comments :

Post a Comment

Note: Only a member of this blog may post a comment.

Copyright 2017. All Rights Reserved. Privacy Policy / Terms And Conditions / Sitemap / Contact