int count1=0,count2=0,count3=0,count4=0; for(int i=0;i<10;i++) { if(staff[i].category==1) { if(staff[i].scheme==1) { count1++; } else if(staff[i].scheme==2) { count2++; } } else if(staff[i].category==2) { if(staff[i].scheme==1) { count3++; } else if(staff[i].scheme==2) { count4++; } } } cout<
int count1=0,count2=0,count3=0,count4=0;
for(int i=0;i<10;i++)
{
if(staff[i].category==1)
{
if(staff[i].scheme==1)
{
count1++;
}
else if(staff[i].scheme==2)
{
count2++;
}
}
else if(staff[i].category==2)
{
if(staff[i].scheme==1)
{
count3++;
}
else if(staff[i].scheme==2)
{
count4++;
}
}
}
cout<<endl;
cout<<"Report of selected Scheme"<<endl;
cout<<"Category Academic"<<endl;
cout<<"\tPension 56 : "<<count1<<endl;
cout<<"\tPension 60 : "<<count2<<endl;
cout<<"Report of selected Scheme"<<endl;
cout<<"Category Non-Academic"<<endl;
cout<<"\tPension 56 : "<<count3<<endl;
cout<<"\tPension 60 : "<<count4<<endl;
what programme can i use to collect the total of people who choose between academic and non academic and pension 56 and pension 60, and have to display it like the picture given..
Step by step
Solved in 2 steps with 1 images