RICARDOEMF03

PseInt - ejercicio 9 primos del 1 al 100

Jan 31st, 2019
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. Algoritmo primos
  2. NUMERO<-1;
  3. x<-0;
  4. mientras x<27 Hacer
  5. DIVISOR<-1;
  6. CEROS<-1;
  7. MIENTRAS DIVISOR<NUMERO Hacer
  8. RESPUESTA<-NUMERO MOD DIVISOR;
  9. SI RESPUESTA=0 ENTONCES
  10. CEROS<-CEROS+1
  11. FINSI
  12. DIVISOR<-DIVISOR+1;
  13. FinMientras
  14. SI CEROS<=2 ENTONCES
  15. Escribir numero;
  16. x<-x+1;
  17. FINSI
  18. numero<-numero+1;
  19. FinMientras
  20.  
  21.  
  22.  
  23. FinAlgoritmo
Add Comment
Please, Sign In to add comment