So i am trying making a simple calculator in pascal but i am having trouble adding fractions. Like for example i am trying to add 1.5 and 1 so the result should be 2.5 but the output i get is something like 2.5000000e+00 something like that.
How can i change the code so that it outputs a 2.5?
program fractionsum;
uses crt;
var
a,b:real;
c:real;
begin
clrscr;
a:=1.5;
b:=1;
c:=a+b;
writeln (c);
readkey;
end.