3)Ram’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

Posted: September 17, 2012 in CSE Sem1, ECE Sem1, Lab 10B, Lab 10B
#include<stdio.h>
void main()
{
	float bs,da,hr,gs;
	printf("Enter bs");
	scanf("%f",&bs);
	da=(40*bs)/100;
	hr=(20*bs)/100;
	gs=bs+da+hr;
	printf("%f\n%f\n%f\n",da,hr,gs);
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s