Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char **argv)
- {
- int n;
- float q[5];
- printf("Podaj dowolna liczbe sekund: ");
- scanf("%i", &n);
- q[0]=n / (60.0 * 60.0 * 24.0 * 7.0 * 12.0);
- printf("%i sekund, to %q[0] lat:\n", &n , q[0] );
- q[1]=n / (60.0 * 60.0 * 24.0 * 7.0 * 12);
- printf("%i sekund, to %c miesiecy:\n", &n, q[1]);
- q[2]=n / (60.0 * 60.0 * 24.0 * 7.0);
- printf("%i sekund, to %c tygodni:\n", &n, q[2]);
- q[3]=n / ( 60.0 * 60.0 * 24.0 );
- printf("%i sekund, to %c dniu:\n", &n, q[3]);
- q[4]=n / ( 60.0 * 60.0 );
- printf("%i sekund, to %c godzin:\n", &n, q[4]);
- q[5]=n /( 60.0 );
- printf("%i sekund, to %c minut:\n", &n, q[5]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment