quá dễ
uses crt;
var a,b,c,s:longint;
begin
clrscr;
write('a='); readln(a);
write('b='); readln(b);
write('c='); readln(c);
s:=a+b+c;
writeln('tong cua 3 so la: ',s);
readln;
end.
Program Tinh_tong;
uses crt;
var a,b,c,s: integer;
Begin
clrscr;
Write('Nhap so a:'); Readln(a);
Write('Nhap so b:'); Readln(b);
Write('Nhap so c:'); Readln(c);
s:=a+b+c;
Writeln('Tong cua s la:',s);
Readln
End.
program chuong trinh tinh tong 3 so a b c;
var s,a,b,c:real;
uses crt;
begin
clrscr;
writeln('nhap so thu nhat a:');readln(a);
writeln('nhap so thu 2 b:');readln(b);
writeln('nhap so thu 3 c:');readln(c);
s:=a+b+c;
writeln('tong 3 so a+ b+ c la:',s:8:3);
readln;
end.
#Lazi
program chuong trinh tinh tong 3 so a b c;
var s,a,b,c:real;
uses crt;
begin
clrscr;
writeln('nhap so thu nhat a:');readln(a);
writeln('nhap so thu 2 b:');readln(b);
writeln('nhap so thu 3 c:');readln(c);
s:=a+b+c;
writeln('tong 3 so a+ b+ c la:',s:8:3);
readln;
end.
Program Tinh_tong;
uses crt;
var s,a,b,c:real;
Begin
clrscr;
Write('Nhap so a:'); Readln(a);
Write('Nhap so b:'); Readln(b);
s:= a+b;
Writeln('Tong cua hai so la:',s);
Readln
End.
Program tinh_tong;
Var a,b,c,S : integer;
Begin
Writeln('Nhap gia tri cho a');
Readln(a);
Writeln('Nhap gia tri cho b');
Readln(b);
Writeln('Nhap gia tri cho c');
Readln(c);
S:=a+b+c
Writeln("Tong cua S=',S);
Readln;
End.
Ặc
Writeln('Tong cua S=',S);
nha,mình ghi nhầm dấu