Advertisement
Guest User

Lektuvas

a guest
Oct 20th, 2011
837
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8. int a, b, c, v, m, min;
  9.  
  10. cout << "Iveskite, kada pakilo lektuvas (valanda ir minute) bei kiek laiko jis praleido ore (minutemis)." << endl;
  11. cin >> a >> b >> c;
  12.  
  13. cout << "Lektuvas pakilo " << a << ":" << b << endl;
  14.  
  15. min = a*60 + b + c;
  16.  
  17. v = (min / 60) % 24;
  18.  
  19. m = min % 60;
  20.  
  21. cout << "Lektuvas nusileis " << v << ":" << m;
  22.  
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement