Uses wincrt; Var n, jumlah, pencacah : integer;
begin clrscr; Writeln('Menghitung jumlah 1 + 2 + 3 + ... + n'); write('n = ? '); readln(n); pencacah:=0; jumlah:=0;
repeat begin jumlah:=jumlah+pencacah; pencacah:=pencacah + 1; end;
until pencacah = n+1; writeln; writeln('Jumlah deret = ',jumlah); readln; end.
--------------------- oOo --------------------- uses wincrt; var i:integer; begin clrscr; i:=1; repeat writeln('Yahya Oteda Net'); i:=i+1; until (i>5); readln; end.
--------------------- oOo --------------------- uses wincrt; var input,temp, temp2 : byte; begin clrscr; write('Masukkan inputan bilangan: '); temp:=1; readln(input); repeat temp2:=1; repeat write(temp2); temp2:=temp2+1; until temp2>temp; writeln; temp:=temp+1; until temp>input; writeln('Anda tekan enter untuk keluar'); readln; end.
--------------------- oOo --------------------- Uses Wincrt; var kata: string; i,j : byte; begin kata:='YAHYAOTEDA'; for i:=1 to length(kata) do begin for j:=1 to i do begin write(kata[j]); end; writeln; end; end.
--------------------- oOo ---------------------
|