seergiomv

ejercicio 11.1

Oct 19th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2. int main() {
  3.     int s, h, m, ss;
  4.     printf("Introduce el tiempo en segundos: ");
  5.     scanf("%d", &s);
  6.     h = s/3600;
  7.     m = (s - h*3600)/60;
  8.     ss = s - (h*3600 + m*60);
  9.     printf("%d segundos son %d h:%d m: %d s", s, h, m, ss);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment