| | |
I need serious help, I am confused
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2005
Posts: 5
Reputation:
Solved Threads: 0
This code is supposed to determine a salesperson's gross pay for last week, calculate and display thier earnings. The salesperson each receive $200 per week plus 9 percent of thier gross sales. The output should display like this:
Enter sales in dollars (-1 to end):
Salary is: $650.00
Enter sales in dollars (-1 to end): -1
Is my code right? I am simply confused.
Enter sales in dollars (-1 to end):
Salary is: $650.00
Enter sales in dollars (-1 to end): -1
Is my code right? I am simply confused.
•
•
Join Date: Sep 2005
Posts: 6
Reputation:
Solved Threads: 0
// this code help you to solve your problem
# include <iostream.h>
main ()
{
// array of salary
int salary[10] ;
do {
// prompt to the user
for (int i = 0 ; i < 10 ;i++)
cout << "Enter the salary ";
cin >> salary
// this loop go till that salary is greater than 0 means salar > 0
}while(salary[i] > 0 );
}
# include <iostream.h>
main ()
{
// array of salary
int salary[10] ;
do {
// prompt to the user
for (int i = 0 ; i < 10 ;i++)
cout << "Enter the salary ";
cin >> salary
// this loop go till that salary is greater than 0 means salar > 0
}while(salary[i] > 0 );
}
![]() |
Similar Threads
- confused about SE + SEO. (Search Engine Optimization)
- Confused about SATA RAID (Storage)
- Confused about loops and switch (Java)
- Confused writing a Java Class (Java)
- confused about shell sort ... (C)
- confused how to begin this program (C++)
- Need help With this C++ Program..Confused.. (C++)
- ftp client issues...im so confused...plz help!!! (Windows Software)
Other Threads in the C++ Forum
- Previous Thread: missing something
- Next Thread: help with estimation of number e
Views: 1224 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays based beginner binary c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multiple 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 template templates text tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets





