Salary Structure C++ Language Program Code

Dispaly Employee number, Salary , HRA and Total

#include
#include
void main()
{
int a[10],n,i,total;
clrscr();
cout<<"Enter value of n:";
cin>>n;
cout<<"Enter the salaries:n";
for(i=0;i {
cin>>a[i];

}
cout<<"nttEMPNOt"<<"SALt"<<"HRAt"<<"TOTALnn";
for(i=0;i {
total=0;
cout<<"ntt"< if(a[i]>=10000)
{
cout<<"t3000";
total=total+a[i]+3000;
cout<<"t"< }
else
{
cout<<"t1500";
total=total+a[i]+1500;
cout<<"t"< }
}

getch();
}

Add Comment