Program soquaoi;
Uses Crt;
Var a,b: Integer;
TKL, KL: Real;
Begin Clrscr;
write('so oi =' ) Readln ( a);
write ( ' khoi luong='); Readln(KL);
TKL:= a*KL;
b:=a mod 8;
writeln('tong khoi luong=',TKL);
write (' so du cho 8=', b);
Readln;
End.
Theo phần mềm Free Pascal IDE thì sẽ viết như sau:
program khoiluong;
uses crt;
var a,b,tongkhoiluong,sodu:integer;
begin
clrscr;
writeln('Hay nhap so qua oi);readln(a);
writeln('Hay khoi luong oi');readln(b);
tongkhoiluong:=a*b;
sodu:=a mod 8;
writeln('tong khoi luong ',tongkhoiluong);
writeln('So oi du sau khi chia cho 8 la',sodu);
readln;
end.
CHÚC BẠN HỌC TỐT!!!!!!!!!!!!