Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
improve diff tempo
Browse files Browse the repository at this point in the history
  • Loading branch information
mc-cat-tty committed Sep 28, 2021
1 parent 16b7da0 commit 3ede217
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Binary file removed esercitazioni/.5_diff_tempo.cpp.swp
Binary file not shown.
4 changes: 3 additions & 1 deletion esercitazioni/5_diff_tempo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ int main() {
cin >> min1 >> sec1;
cout << "Minuti e secondi secondo tempo? ";
cin >> min2 >> sec2;
cout << "Differenza: " << abs(min1*60+sec1-(min2*60+sec2)) << endl;
int res = abs(min1*60+sec1-(min2*60+sec2));
cout << "Differenza (sec): " << res << endl;
cout << "Differenza (min sec): " << (int)res/60 << " " << res%60 << endl;
}

Binary file modified esercitazioni/a.out
Binary file not shown.

0 comments on commit 3ede217

Please sign in to comment.