fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int h1,h2,m1,m2,s1,s2,y,pay,q;
  7. cout<< "enter the first work duration"<<endl;
  8. cin >> h1>>m1>>s1 ;
  9. cout<< "enter the second work duration"<<endl;
  10. cin >> h2>>m2>>s2 ;
  11. q=s1+s2;
  12. q=q/60
  13. y= (h1+h2)*60+s1+s2+m1+m2;
  14. if (y>540)
  15. {
  16. pay=1.5*540+(y%540)*2.5;}
  17. cout << pay<<endl;
  18.  
  19. return 0;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:13:1: error: expected ';' before 'y'
 y= (h1+h2)*60+s1+s2+m1+m2;
 ^
stdout
Standard output is empty