Advertisement
albertohilal

Clase 4 Ejercicio 3.2.24

Sep 3rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. /*Escribir un procedimiento PintarCeldaMarron que pinte una
  2. celda de color marron (agregando bolitas de los cuatro colores en la celda actual)
  3. solo si no hay bolitas de ningun color.
  4. Considerar la utilizacion de la funcion del ejercicio anterior
  5. y una alternativa condicional.*/
  6.  
  7. function hayAlgunaBolita(){
  8. return (hayBolitas(Azul)|| hayBolitas(Negro)||hayBolitas(Rojo)|| hayBolitas(Verde))
  9. }
  10.  
  11.  
  12. procedure PintarCeldaMarron(){
  13. if (not hayAlgunaBolita()){
  14. Poner(Azul)
  15. Poner(Negro)
  16. Poner(Rojo)
  17. Poner(Verde)
  18. }
  19. }
  20.  
  21. procedure Main(){
  22. PintarCeldaMarron()
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement