Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- int main(){
- int horas, min, seg;
- printf("Insira a informacao em segundos:\t");
- scanf("%i",&seg);
- if (seg>=60){
- min=seg/60;
- seg=seg%60;
- }
- else if (seg<60){
- min=0;
- }
- if (min>=60){
- horas=min/60;
- min=min%60;
- }
- else if (min<60){
- horas=0;
- }
- printf("\n\t%ih %im %is\n",horas, min, seg);
- return 0;
- }
Add Comment
Please, Sign In to add comment