View ancestor and descendant, then adding 2 char
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Author: Eden
Program: Znak_suc.pas
File exe: Znak_suc.exe
Author: Eden
Program: Znak_suc.pas
File exe: Znak_suc.exe
View ancestor and descendant, then adding 2 char.
{ ZNAK_SUC.PAS } { Ukaze predchodcu a naslednika, potom scita dva znaky } { } { Datum:08.02.2006 http://www.trsek.com } program Znak; uses Crt; var a,b:char; begin ClrScr; writeln('Zadaj znak'); readln(a); writeln('Zadaj znak'); readln(b); ClrScr; writeln('************************************'); writeln('Zadany znak je ',a); writeln('Pred znakom (',a,') je ',pred(a)); writeln('Za znakom (',a,') je ', succ(a)); writeln('Znak (',a,') ma poradie ',ord(a)); writeln('************************************'); readln; ClrScr; writeln('************************************'); writeln('Zadany znak je ',b); writeln('Pred znakom (',b,') je ',pred(b)); writeln('Za znakom (',b,') je ',succ(b)); writeln('Znak (',b,') ma poradie ',ord(b)); writeln('************************************'); readln; ClrScr; writeln('****************************'); writeln; writeln('Sucet ',a,' + ',b,' je ',a+b); writeln; writeln('****************************'); readln; ClrScr; writeln('Vytvoril : Martin Andrisak '); writeln('S P S E Nove Zamky'); writeln('---------- 2 . BE ----------'); readln; end.