please help me........
it is making many errors i don't know what to do
here's my program...
please tell why it is not working
it is making many errors i don't know what to do
here's my program...
please tell why it is not working
Code:
#include"iostream.h"
#include"conio.h"
#include"stdio.h"
struct employee
{
int empno;
char empname[40];
char empaddress[40];
float basic,da,hra,cca,pf,totalsalary;
};
void main()
{
clrscr();
employee em[4];
for(int i=0;i<4;++i)
{
cout<<"enter the number of employee "<<endl;
cin>>em[i].empno;
cout<<"enter the name of employee "<<endl;
gets(em[i].empname);
cout<<"enter the address of employee "<<endl;
gets(em[i].empaddress);
cout<<"enter the basic of employee "<<endl;
cin>>em[i].basic;
cout<<"enter the pf of employee "<<endl;
em[i].pf=0.1*em[i].basic;
cout<<"enter da of employee "<<endl;
em[i].da=1.23*em[i].basic;
cout<<"enter hra of an employee "<<endl;
cin>>em[i].hra;
cout<<"enter cca of an employee "<<endl;
cin>>em[i].cca;
em[i].totalsalary=em[i].basic+em[i].da+em[i].pf+em[i].cca+em[i].hra;
cout<<"employee number is "<<em[i].empno<<endl;
cout<<"employee name is "<<em[i].empname<<endl;
cout<<"employee address is "<<em[i].empaddress<<endl;
cout<<"basic salary is "<<em[i].basic<<endl;
cout<<"pf is "<<em[i].pf<<endl;
cout<<"da is "<<em[i].da<<endl;
cout<<"hra is "<<em[i].hra<<endl;
cout<<"cca is "<<em[i].cca<<endl;
cout<<"total salary is "<<em[i].totalsalary<<endl;
getche();
}
}
Comment