hi,
This is the code for file company.c:
/*Calculation of gross salary*/
main()
{
float bs,gs,da,hra;
printf("Enter your basic salary\n");
scanf("%f",&bs);
if(bs<1500);
{
hra=bs*10/100;
da=bs*90/100;
}
else
{
hra=500;
da=bs*98/100;
}
then i tried the gcc -o ..and there is the output:
root@localhost lbin]# gcc -o company company.c
company.c: In function `main':
company.c:14: error: parse error before "else"
company.c: At top level:
company.c:20: error: `bs' undeclared here (not in a function)
company.c:20: error: `hra' undeclared here (not in a function)
company.c:20: error: `da' undeclared here (not in a function)
company.c:20: warning: data definition has no type or storage class
company.c:21: error: parse error before string constant
company.c:21: warning: conflicting types for built-in function `printf'
company.c:21: warning: data definition has no type or storage class
plz help me where is the mistakes.