Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main (){
- int hi,hf,hj;//hr inicio e hora fim e duração do jogo
- cin >> hi >> hf;
- if(hi>=hf){
- hj = (hf-hi)+24;
- }
- else{
- hj = hf-hi;
- }
- cout << "O JOGO DUROU " << hj << " HORA(S)" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement