Created
November 28, 2019 21:18
-
-
Save maggiben/e71679f060d1e5741fd9546cf3bd9367 to your computer and use it in GitHub Desktop.
Forrajeria
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Funcion suma <- totalFacturado ( facturas ) | |
| suma <- 0 | |
| Para i<-1 Hasta 5 Con Paso 1 Hacer | |
| suma <- suma + facturas[i, 4] | |
| Fin Para | |
| Fin Funcion | |
| Funcion suma <- totalKilos ( facturas ) | |
| suma <- 0 | |
| Para i<-1 Hasta 5 Con Paso 1 Hacer | |
| suma <- suma + facturas[i, 2] | |
| Fin Para | |
| Fin Funcion | |
| Funcion suma <- facturasGrandes ( facturas ) | |
| suma <- 0 | |
| Para i<-1 Hasta 5 Con Paso 1 Hacer | |
| Si facturas[i, 4] > 600 Entonces | |
| suma <- suma + 1 | |
| Fin Si | |
| Fin Para | |
| Fin Funcion | |
| Algoritmo facturacion | |
| Dimension facturas[5, 4] | |
| Para i<-1 Hasta 5 Con Paso 1 Hacer | |
| Escribir "Ingrese el código del atrículo" | |
| Leer codigo | |
| facturas[i, 1] <- codigo | |
| Escribir "Ingrese la cantidad de kilos vendidos" | |
| Leer kilos | |
| facturas[i, 2] <- kilos | |
| Escribir "Ingrese el precio por kilo" | |
| Leer precio | |
| facturas[i, 3] <- precio | |
| facturas[i, 4] <- kilos * precio | |
| Fin Para | |
| Escribir "Total facturado: " totalFacturado(facturas) | |
| Escribir "Total kilos vendidos: " totalKilos(facturas) | |
| Escribir "Facturas mayores a 600: " facturasGrandes(facturas) | |
| FinAlgoritmo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment