0

Get the remarks of ten employees on three items...
the remarks is determined by comparing the total sale of an employee to the average of the group..

i've done this already..dont know to add the items...and get its average...
its only the input...

#include<iostream>
#include<conio.h>
using namespace std;
int i,n[10],it,item[3];

int main(){

    cout<<"Rate the Employee's Performance [1-10].\n";
    cout<<"10 is the highest 1 is the lowest.\n";


    for(i=1;i<11;i++){
    cout<<"\tEmployee no."<<i<<".\n";
    for(it=1;it<4;it++){
                        cout<<"\tItem no."<<it<<":";
                        cin>>item[it];


                        }
system("cls");

}


getch();
return 0;
}

Edited by Reverend Jim: Fixed formatting

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Sky Diploma
0

Add the 10 totals value to derieve a FULL SALES value, That Sales divided by 10 would give you the Average. What you can do is store the totals in the array, then compute the Average. And then determine...

Btw, Please make sure if your code runs properly. It must be currently crashing .

for(it=1;it<4;it++){
cout<<"\tItem no."<<it<<":";
cin>>item[it];

The array Index starts from 0 to n-1 for any definition of data_type array_name[n]; where n is a constant value .

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.