Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int vkupno;
- int vkupno2;
- cin >> vkupno;
- vkupno2 = vkupno;
- int h = vkupno / 3600;
- vkupno -= h * 3600;
- int m = vkupno / 60;
- int s = vkupno % 60;
- cout << vkupno2 << " sekundi se " << h << " casovi, " << m << " minuti i " << s << " sekundi" <<endl;
- return 0;
- }
- // 14500
- // 4h --> 4*3600 = 14400
- // 100 / 60 = 1
- // 40
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement