Codingnya :
uses crt;
var
a,c,d : integer;
operator, z:char;
begin
repeat
clrscr;
Writeln('PETUNJUK:');
Writeln('1. Masukkan angka pertama');
Writeln('2. Masukkan operator (+, -, /, *)');
Writeln('3. Masukkan Angka kedua');
Writeln (‘-------------------------------‘);
Writeln('PERHITUNGAN: ');
Writeln (‘------------------------------‘);
Write('Masukkan angka: '); readln(a);
write('Operator: '); readln(Operator);
write('Angka ke dua: '); readln(c);
case operator of
'+': d:=a + c;
'-': d:=a - c;
'/': d:=a div c;
'*': d:=a * c;
end;
writeln('Hasil: ',d);
writeln;
writeln (‘by: Teman Kita MI 1db01’);
writeln (‘A.Amjad Mujaddid Al.a’);
writeln (‘Ahmad Hidayat’);
writeln (‘Nency Susilowati’);
writeln (‘Rudi Setiawan’);
writeln (‘Sefri’);
writeln;
Write('Hitung lagi? (y/n) '); readln(z);
until Upcase(z) <> 'Y';
end.
~Selamat mencoba ~
Tidak ada komentar:
Posting Komentar