1
Vote

Ambiguous output

description

Whatever program i type i receive ambiguous output. For instance for below program :

include<stdio.h>

include<conio.h>

int main()
{
clrscr();
float gs,bs,da,hra;
printf("Enter basic salary");
scanf("%f",&bs);
da=(40/100)bs;
printf("Da is %f",da);
hra=(20/100)
bs;
printf("hra is %f",hra);
gs=bs+da+hra;
printf("Gross salary is %f",gs);
getch();
return 0;
}
And for this i receive below as output(bs i enter is 100):
4000.000
0
4100.000

file attachments

comments