Advertisement
adventuretimeh

totale in secondi

Nov 21st, 2019
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  4.  
  5. int main(int argc, char *argv[]) {
  6. int ore,minuti,secondi,tot_sec,a,b;
  7. printf("ore");
  8. scanf("%d",&ore);
  9. printf("minuti");
  10. scanf ("%d",&minuti);
  11. printf("secondi");
  12. scanf("%d",&secondi);
  13. a=minuti*60;
  14. b=ore*3600;
  15. tot_sec=secondi+a+b;
  16. printf("il valore totale in secondi vale %d",tot_sec);
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement