| | |
help me in solving this..
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2009
Posts: 9
Reputation:
Solved Threads: 1
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...
[CODE]#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;
}
[CODE]
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...
[CODE]#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;
}
[CODE]
0
#2 Oct 25th, 2009
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 .
The array Index starts from 0 to n-1 for any definition of
Btw, Please make sure if your code runs properly. It must be currently crashing .
C++ Syntax (Toggle Plain Text)
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 . ![]() |
Similar Threads
- PLz I need help!!!..C++ problem solving (C++)
- Help solving this problem (C++)
- plz help me in solving this files concept question (Java)
- Matlab: Solving linear system with QR (Legacy and Other Languages)
- Problem Solving Flowsheet (Geeks' Lounge)
- Solving a matrix (C++)
- Solving Challenge Suggestion (DaniWeb Community Feedback)
Other Threads in the C++ Forum
- Previous Thread: how to use project?
- Next Thread: How to make shapes ?
| Thread Tools | Search this Thread |
api array arrays beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates test text tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





