program tong;
uses crt;
var M, N, S, i: integer;
begin
clrscr;
write ('Nhap M= '); readln(M);
write ('Nhap N= '); readln(N);
s : = 0;
for i := M to N do if (i mod 2 = 0) then s:= s + i;
write (T'ong cac so chan trong pham vi tu M den N = ',s);
readln;
end.
mk mới làm tổng thui nghen
Program Tong_hieu_tich_thuong;
Uses crt;
Var a:integer;
b:integer;
Begin
clrscr;
write(‘nhap so thu 1 :’);
readln(a);
writeln(‘ban vua nhap so: ‘,a);
write(‘nhap so thu hai :’);
readln(b);
writeln(‘ban vua nhap so thu 2: ‘,b);
Writeln(a,’+’,b,’=’,a+b);
Writeln(a,’-‘,b,’=’,a-b);
Writeln(a,’*’,b,’=’,a*b);
if b<>0 then
Writeln(a,’/’,b,’=’,a/b);
readln;
End.
bạn in ra đc chx mình làm cái mới rùi đó
Var m,n:integer;
Begin
Write('Nhap m = ');readln(m);
Write('Nhap n = ');readln(n);
Writeln('Tong la ',m + n);
Writeln('Hieu la ',m - n);
Writeln('Tich la ',m * n);
Write('Thuong la ',m/n:10:2);
Readln;
End.