Sčíta x čísel
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Author: Miroslav Lízal, Tomáš Okurek
web: pascalweb.wz.cz/index86.html
Program: Sectix.pas
File exe: Sectix.exe
Author: Miroslav Lízal, Tomáš Okurek
web: pascalweb.wz.cz/index86.html
Program: Sectix.pas
File exe: Sectix.exe
Sčíta x čísel.
{ SECTIX.PAS Copyright (c) Miroslav Lízal, Tomá Okurek } { Scita x cisel } { } { Datum:25.04.2003 http://www.trsek.com } program sectixcisel; uses crt; var kolik,i:integer; var cislo,vysledek:real; begin clrscr; textcolor(009); write(' '); writeln('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'); write(' '); write('XXXXXXXXXX'); textBackground(002); textcolor(100); write(' Program pro scitani x cisel '); textBackground(000); textcolor(001); writeln('XXXXXXXXXXXX'); write(' '); writeln('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'); writeln(''); textcolor(004); write('Zadejte pocet scitanych cisel: '); textcolor(yellow); readln(kolik); writeln(''); i:=0; vysledek:=0; while not(kolik=i) do begin textcolor(004); write('Zadejte ',i+1,'. cislo: '); textcolor(yellow); read(cislo); writeln(''); i:=i+1; vysledek:=vysledek+cislo; end; textcolor(green); write('Vysledek je: ',vysledek:2:2); readln; end.