943,589 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1292
  • C++ RSS
Sep 30th, 2005
0

I need serious help, I am confused

Expand Post »
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.
Attached Files
File Type: cpp employeeSalary.cpp (1.9 KB, 11 views)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jahowell01 is offline Offline
5 posts
since Aug 2005
Oct 3rd, 2005
0

Re: I need serious help, I am confused

// 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 );

}
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ITgeneration is offline Offline
6 posts
since Sep 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: missing something
Next Thread in C++ Forum Timeline: help with estimation of number e





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC