# include <iostream.h>
# include <stdlib.h>
 main()
 {
 float  hoursworked,hourlyrate,nh;
 int x;
 cout << "Enter number (-1) to end the program and any number to continue: ";
 cin  >> x;
 cout << "-----------------------------------------------------------------";
 cout << "\n";

 while (x!=-1){
 cout << "Enter hours worked             :";cin >> hoursworked;
 cout << "Enter hourly rate of the worker:";cin >>hourlyrate;
 if (hoursworked<=40)
     cout <<"Salary is                   :"<<(hoursworked*hourlyrate);
 else {
      nh=hoursworked-40;
      cout<<nh;
     cout <<"Salary is                    :"<<((40+(nh*1.5))*10)<<endl;
       }
 cout <<"\n";
 cout << "------------------------\n" ;
 cout << "\n";
 cout << "Enter number (-1) to end the program and any number to continue: ";
 cin  >> x;
 cout << "-----------------------------------------------------------------";
 cout << "\n";
 }
 getchar();
 return 0;
 }

