| | |
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 ?
Views: 130 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamiccharacterarray email encryption error file format forms fstream function functions game givemetehcodez graph homeworkhelp iamthwee ifstream input int java lib lines list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search simple sort sorting spoonfeeding string strings struct temperature template templates text tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets





