Program rewrite all vowels with char a
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Author: Juraj Pupák
Program: Samohlas.pas
File exe: Samohlas.exe
Author: Juraj Pupák
Program: Samohlas.pas
File exe: Samohlas.exe
Program rewrite all vowels with char a.
{ SAMOHLAS.PAS } { Program nahradi vsetky samohlasky v slove pismenom a. } { } { Author: Juraj Pupak } { Date : 27.10.2006 http://www.trsek.com } program Samohlasky; uses crt; var Cstr_slovo : string; index : integer; Cstr_1,Cstr_2 : string; dlzka_slova : integer; slovo : string; begin clrscr; writeln('Program nahradi vsetky samohlasky v slove pismenom a.'); writeln('-----------------------------------------------------'); write('Zadaj slovo : '); readln(Cstr_slovo); dlzka_slova := length(Cstr_slovo); For index := 1 To dlzka_slova Do begin Cstr_1 := Cstr_slovo[index]; IF (Cstr_1 = 'i') or (Cstr_1 = 'o') or (Cstr_1 = 'u') or (Cstr_1 = 'e') THEN begin Cstr_2 := Cstr_2 + 'a'; end else begin Cstr_2 := Cstr_2 + Cstr_1; end; end; writeln(' zmenene : ',Cstr_2); readln; end.