Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. program TeoricoVocales;
  2.  
  3. var
  4. vocales:array [1..10] of char;
  5. sn, letra:char;
  6. indice:integer;
  7.  
  8. function EsVocal(a:char):boolean;
  9. begin
  10. esVocal:=(a='a')or(a='e')or(a='i')or(a='o')or(a='u')or(a='A')or(a='E')or(a='I')or(a='O')or(a='U');
  11. end;
  12.  
  13. begin
  14. indice:=0;
  15. repeat
  16. writeln('Ingrese una letra');
  17. readln(letra);
  18. if EsVocal(letra)then
  19. begin
  20. indice:=indice+1;
  21. if indice<=10 then
  22. begin
  23. vocales[indice]:=letra;
  24. end;
  25. end;
  26. writeln('¿Desea continuar? S/N');
  27. readln(sn)
  28. until (sn='N')or(sn='n')or(indice=10);
  29. writeln('Cantidad de vocales ingresadas es: ',indice);
  30. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement