Nama : Agy eka lesmana / 10108122 Kelas : 1 Ka 20 M.kuliah : Algoritma & Pemrograman 2A( Pak Achsan) "PEMROGRAMAN PASCAL" *SATU* program satu_a; uses crt; var i,j :integer; begin clrscr; write('masukan angka looping : ');readln(i); j :=0; repeat j :=j+1; writeln(j); until j=i; readln; end. program satu_b; uses crt; var i,j :integer; begin clrscr; write('isi kan angka looping : ');readln(i); j:=1; while j<=i do begin writeln(j); j:=j+1; end; readln; end. program satu_c; uses crt; var i,k: integer; begin clrscr; write('masukan nilai : ');readln(i); for k:= 1 to i do writeln(k); readln; end. *DUA* program dua_a; uses crt; var i,j :integer; begin clrscr; write('masukan angka looping : ');readln(i); j :=i+1; repeat j :=j-1; writeln(j);
until j=1; readln; end. program dua_b; uses crt; var i,j :byte; begin clrscr; write('isi kan angka looping : ');readln(i); j:=i; i:=i+1; while j
j:= 0+1; writeln(l+j+i); end; end; readln; end. program tiga; uses crt; var awal,akhir,i:integer; begin clrscr; awal :=1 ; akhir:=15; i:=awal-2; repeat i:=i+2; writeln(i); until i = akhir; readln; end. *EMPAT* program empat; uses crt; var awal,akhir,i :integer; begin clrscr; awal := 1; akhir:=15; i:= akhir+2; repeat i:=i-2; writeln(i); until i=awal; readln; end. program empat; uses crt; var awal,akhir,i :integer; begin clrscr; awal := 1; akhir:=15; i:= akhir+2; repeat i:=i-2; writeln(i); until i=awal; readln; end. program empat; uses crt; var awal,akhir,i :integer; begin clrscr;
awal := 1; akhir:=15; i:= akhir+2; repeat i:=i-2; writeln(i); until i=awal; readln; end. *LIMA* program lima; uses crt; var a,i,awal,akhir,jumlah : word; begin clrscr; write('masukan nilai awal : ');readln(awal); write('masukan nilai akhir: ');readln(akhir); jumlah:=0; for i:= awal to akhir do begin write('masukan nilai ke ',i, '=');readln(a); jumlah:=jumlah + a ; end; writeln('jumlah bilangan - bilangan tersebut adalah : ',jumlah); readln; end.