|
vecej jak 450 programoch ľem tak zadarmo
|
![]() English |
![]() Slovensky |
![]() Česky |
![]() Šarišsky |
|
Kategorija: Zadaňa zos Pascalu Zrobil: Pheo web: pascalsource.ic.cz Program: Dve_cisla.pas Subor exe: Dve_cisla.exe Program na určenie súčtu, súčinu, rozdielu, podielu dvoch daných čísel s voľbou operácie.
Kuklo še: 1095x
{ DVE_CISLA.PAS Copyright (c) Pheo } { Program na určenie súčtu, súčinu, rozdielu, podielu dvoch daných } { čísel s vožbou operácie. } { } { Datum:14.04.2003 http://www.trsek.com } program dve_cisla; var a,b:integer; s:real; operation:char; begin s:=0; writeln('zadaj dve cisla:'); readln(a,b); writeln('zvol si operaciu:+,-,*,/'); read(operation); case operation of '+':s:=a+b; '-':s:=a-b; '*':s:=a*b; '/':if b<>0 then s:=a/b else write('nedefinovane v R') end; if not((operation='/') and (b=0)) then writeln('vysledok je ',s:0:2); writeln; readln; end. [Naj beži] [Ulož] [Ciskaj] [Naj idze meilom] |
|