Guest User

Untitled

a guest
Feb 25th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.72 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char **argv)
  4. {
  5.     int n;
  6.     float q[5];
  7.    
  8.     printf("Podaj dowolna liczbe sekund: ");
  9.     scanf("%i", &n);
  10.    
  11.     q[0]=n / (60.0 * 60.0 * 24.0 * 7.0 * 12.0);
  12.     printf("%i sekund, to %q[0] lat:\n", &n , q[0]  );
  13.     q[1]=n / (60.0 * 60.0 * 24.0 * 7.0 * 12);
  14.     printf("%i sekund, to %c miesiecy:\n", &n, q[1]);
  15.     q[2]=n / (60.0 * 60.0 * 24.0 * 7.0);
  16.     printf("%i sekund, to %c tygodni:\n", &n, q[2]);
  17.     q[3]=n / ( 60.0 * 60.0 * 24.0 );
  18.     printf("%i sekund, to %c dniu:\n", &n, q[3]);
  19.     q[4]=n / ( 60.0 * 60.0 );
  20.     printf("%i sekund, to %c godzin:\n", &n, q[4]);
  21.     q[5]=n /( 60.0 );
  22.     printf("%i sekund, to %c minut:\n", &n, q[5]);
  23.  
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment