Program read first and surname name
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Author: Juraj Pupák
Program: Meno_pri.pas
File exe: Meno_pri.exe
Author: Juraj Pupák
Program: Meno_pri.pas
File exe: Meno_pri.exe
Program read first and surname name. Then write surname name.
{ MENO_PRI.PAS } { Vyziada si meno a priezvisko. Z nich urci priezvisko. } { } { Author: Juraj Pupak } { Date : 27.10.2006 http://www.trsek.com } program Meno_Priezvisko; uses crt; var udaje : string; i,i_1 : integer; dlzka_retazca : integer; priezvisko : string; begin clrscr; writeln('Zadaj meno a priezvisko'); readln(udaje); clrscr; dlzka_retazca := length(udaje); For i := 1 To dlzka_retazca Do begin If udaje[i] = ' ' THEN begin For i_1 := i To dlzka_retazca Do begin priezvisko := priezvisko + udaje[i_1 + 1]; end; writeln(priezvisko); end; end; readln; end.