House rent following condition.
1. 40% of basic if basic is grater then or equal to 5000
2. 50% of basic if basic is less then 5000
Program:
#include<stdio.h>
main(){
int basic,hr;
printf("Enter basic = ");
scanf("%d", &basic);
if(basic>=5000)
hr=basic*.40;
else
hr=basic*.50;
printf("House Rate =%d", hr);
}
1. 40% of basic if basic is grater then or equal to 5000
2. 50% of basic if basic is less then 5000
Program:
#include<stdio.h>
main(){
int basic,hr;
printf("Enter basic = ");
scanf("%d", &basic);
if(basic>=5000)
hr=basic*.40;
else
hr=basic*.50;
printf("House Rate =%d", hr);
}