Program add award of state
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Author: Juraj Pupák
Program: Medajle.pas
File exe: Medajle.exe
Author: Juraj Pupák
Program: Medajle.pas
File exe: Medajle.exe
Program add award of state. Determine best state.
{ MEDAJLE.PAS } { Program spocita medajle podla statov. } { Vyhodnoti ktory stat je lepsi v pocte ziskanych bodov. } { } { Author: Juraj Pupak } { Date : 27.10.2006 http://www.trsek.com } program Medajle; uses crt; var z1,s1,b1,z2,s2,b2 : integer; a,b,c,a1,b3,c1,r,z : integer; begin clrscr; writeln('Zadaj pocet zlatych pre Slovakov'); readln(z1); writeln('Zadaj pocet striebornych pre Slovakov'); readln(s1); writeln('Zadaj pocet bronzovych pre Slovakov'); readln(b1); writeln('Zadaj pocet zlatych pre Cechov'); readln(z2); writeln('Zadaj pocet striebornych pre Cechov'); readln(s2); writeln('Zadaj pocet bronzovych pre Cechov'); readln(b2); clrscr; a := z1 * 3; b := s1 * 2; c := b1 * 1; r := a + b + c; writeln('Slovensko ziskalo ',r,' bodov'); a1 := z2 * 3; b3 := s2 * 2; c1 := b2 * 1; z := a1 + b3 + c1; writeln('Cesko ziskalo ',z,' bodov'); IF r > z THEN begin writeln('Vacsi pocet bodov ziskalo Slovensko'); end else writeln('Vacsi pocet ziskalo Cesko'); readln; end.