Advertisement
JosepRivaille

P70955: Quants segons són?

Feb 19th, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. //Precondició: Llegeix anys, dies, hores, minuts i segons
  5. //Postcondició: Converteix tot a segons i ho suma
  6.  
  7. int main() {
  8.   int a, d, h, m, s;
  9.   cin >> a >> d >> h >> m >> s;
  10.   cout << s+60*m+3600*h+3600*24*d+3600*24*365*a << endl;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement