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

Commit

Permalink
doing part 5
Browse files Browse the repository at this point in the history
  • Loading branch information
mc-cat-tty committed Sep 27, 2021
1 parent 9c9f127 commit 0458a4c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions esercitazioni/5_da_min_sec_a_sec.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <iostream>
#include <cstdio>

using namespace std;

int main() {
int min, sec;
cout << "Minuti? ";
cin >> min;
cout << "Secondi? ";
cin >> sec;
cout << "Equivalgono a " << min*60+sec << " secondi" << endl;
}

12 changes: 12 additions & 0 deletions esercitazioni/5_da_sec_a_min_sec.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <iostream>
#include <cstdio>

using namespace std;

int main() {
int sec;
cout << "Tempo in secondi? ";
cin >> sec;
cout << "Equivalgono a " << (int)sec/60 << " min, " << sec%60 << " sec" << endl;
}

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

0 comments on commit 0458a4c

Please sign in to comment.