Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Escribir un procedimiento GuardaDePares, que permita realizar
- una guarda de bolitas verdes similar a la del grafico G.4.1.
- Utilizar dos repeticiones indexadas, adaptando los
- ındices de manera conveniente.*/
- procedure PonerNVerde(color,cant){
- repeatWith i in 1..cant
- {Poner(color)}
- Mover(Este)
- }
- procedure GuardaDePares(n){
- repeatWith i in 1..n
- {PonerNVerde(Verde,2*i)}
- repeatWith i in 1..n
- {PonerNVerde(Verde,12-(2*i))}
- }
- procedure Main(){
- GuardaDePares(5)
- }
Advertisement
Add Comment
Please, Sign In to add comment