LOGIKA DAN ALGORITMA

By pelita nuramini - Maret 25, 2019

PROGRAM PERULANGAN PERKALIAN



PROGRAM PERULANGAN_PERKALIAN;
USES WINCRT;
VAR
      A : INTEGER;
BEGIN
      FOR A:= 1 TO 5 DO
      WRITWLN(A, 'X', A, '=', A * A);
END.



PROGRAM PENJUMLAHAN



PROGRAM PENJUMLAHAN;
USES WINCRT;
VAR
A, B, HSL : BYTE;
BEGIN
          A:=30;
          B:=20;
          WRITELN('----------------------------------------');
          WRITELN('            PENJUMLAHAN            ');
          WRITELN('----------------------------------------');
          WRITELN('NILAI A:',A);
          WRITELN('NILAI B:',B);
          HSL := A + B;
          WRITELN('HASIL :',HSL);
          WRITELN('----------------------------------------');
END.

  • Share:

You Might Also Like

0 komentar