Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int x1, x10, x60, rides;
  8. cin >> rides;
  9. x60 = rides/60;
  10. if ((rides % 60) >= 35)
  11. {
  12. x60 = x60 + 1;
  13. }
  14. else
  15. {
  16. x10 = (rides % 60)/10;
  17. if ((rides%60)%10 = 9)
  18. {
  19. x10 = x10 + 1;
  20. }
  21. else
  22. {
  23. x1 = (rides%60)%10;
  24. }
  25. }
  26. cout << x1 << x10 << x60;
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement