Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Proceso Marca_Tiempo
- //Diseñe un algoritmo para sumar dos marcas de tiempo dadas en dias, horas, minutos y segundos
- Definir S1, S2, S3, SM, M1, M2, M3, MH, H1, H2, H3, HD, D1, D2, D3 Como Entero
- Escribir "Ingrese la primer marca de tiempo."
- Escribir "Ingrese segundos."
- Leer S1
- Escribir "Ingrese minutos."
- Leer M1
- Escribir "Ingrese horas."
- Leer H1
- Escribir "Ingrese dias."
- Leer D1
- Escribir "Ingrese la segunda marca de tiempo."
- Escribir "Ingrese segundos."
- Leer S2
- Escribir "Ingrese minutos."
- Leer M2
- Escribir "Ingrese horas."
- Leer H2
- Escribir "Ingrese dias."
- Leer D2
- SM <- Trunc((S1+S2)/60)
- S3 <- (S1+S2) Mod 60
- MH <- Trunc((M1+M2+SM)/60)
- M3 <- (M1+M2+SM) Mod 60
- HD <- Trunc((H1+H2+MH)/24)
- H3 <- (H1+H2+MH) Mod 60
- D3 <- HD+D1+D2
- Escribir "La marca de tiempo total es ", D3, ":", H3, ":", M3, ":", S3
- FinProceso
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement