here is my code:
program P1;
var a,b,c,p :real;
var i,o,n: string;
begin
i := 'isoscel';
o := 'echilateral';
n :='scalen';
writeln('Introduceti 3 numerele reale');
readln(a,b,c);
case (a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a) of
true:
begin
p:=a+b+c;
writeln('perimetrul este ',p);
if (a=b) and (b<>c) or (b=c) and (c<>a) or (a=c) and (c<>b) then write('triunghiul este ',i);
if (a=b) and (a=c) and (b=c) then write('triunghiul este ',o);
if (a<>b) and (b<>c) and (c<>a) then write('triunghiul este ',n);
end;
false:
writeln('nu este posibil');
end;
readln();
end.
if for example i insert 5 5 5 i will get this answer:
perimetrul este 1.5000000000000000E+001
triunghiul este echilateral
but if i put a,b,c,p as integer instead of real, i get normal result:
perimetrul este 15
triunghiul este echilateral
i need my variables to be real, can you help me to get normal a answer?