[ dugmee @ 12.12.2009. 18:33 ] @
Dakle moje pitanje je, kako da ubacim ovaj dio sa vrstama trokuta?

Dio koji imam do sada ide ovako:

Code:

program trokut;
var a, b, c : integer;
begin
readln (a, b, c);
if (a + b > c) and (b + c > a) and (a + c > b) then
writeln ('Brojevi cine trokut')
else
writeln ('Brojevi ne cine trokuta');
readln;
end.


Sad treba da ubacim jos o kojem se trokutu radi kao npr. : if (a=b=c) then readln ('trokut je jednostranicni'); ali nikako mi ne uspjeva.

Ima neko neku ideju, trik?
[ xenox @ 12.12.2009. 20:16 ] @
program trokut;
var a, b, c : integer;
begin
readln (a, b, c);
if (a + b > c) and (b + c > a) and (a + c > b) then
begin
if (a=b) and (b=c) then
writeln 'Jednakostranicni trokut'
else
writeln ('Brojevi cine trokut');
end
else
writeln ('Brojevi ne cine trokuta');
readln;
end.