I need serious help, I am confused

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2005
Posts: 5
Reputation: jahowell01 is an unknown quantity at this point 
Solved Threads: 0
jahowell01 jahowell01 is offline Offline
Newbie Poster

I need serious help, I am confused

 
0
  #1
Sep 30th, 2005
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, 9 views)
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 6
Reputation: ITgeneration is an unknown quantity at this point 
Solved Threads: 0
ITgeneration ITgeneration is offline Offline
Newbie Poster

Re: I need serious help, I am confused

 
0
  #2
Oct 3rd, 2005
// 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 );

}
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC