Advertisement
alaminrifat

URI -1046 with C++

Apr 12th, 2020
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include<iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int m,n;
  8.     cin>>m>>n;
  9.     if(n>m)
  10.     {
  11.         cout<<"O JOGO DUROU "<<n-m<<" HORA(S)"<<endl;
  12.     }
  13.     else if(m>=n)
  14.     {
  15.         cout<<"O JOGO DUROU "<<(24+n)-m<<" HORA(S)"<<endl;
  16.     }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement