Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- double decada = 0.0;
- double hora,minuto,segundo,centesimo;
- printf("Informe as horas em HH:MM:SS:CC :");
- scanf("%lf%*c%lf%*c%lf%*c%lf",&hora,&minuto,&segundo,¢esimo);
- centesimo /=100;
- minuto *=60;
- if(minuto && segundo)
- {
- decada = 1.157407407*((3600*hora)+minuto+segundo+centesimo);
- printf("%lf",centesimo);
- }
- else
- {
- decada = 1.157407407*((60*60*100)*hora);
- }
- printf("A hora convertida eh: %g decimos ",decada);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement