uses crt;
label
menu;
var
pil:char;
a,i,j,k,n:integer;
begin
clrscr;
menu : Gotoxy(30,10); writeln('<<
>>');
Gotoxy(30,12); writeln('1. Segitiga');
Gotoxy(30,14); writeln('2. Segitiga Bintang');
Gotoxy(30,16); writeln('3. Exit');
Gotoxy(30,18); write('Yang anda pilih: '); readln(pil);
clrscr;
case pil of
'1' : begin
writeln('***Anda memilih menu 1***');
writeln('<<>>');
write('masukkan angka:');readln(a);
For I:=1 to a do
begin
For J:=1 to I do
begin
K:=I*j;
write(k,' ');
end;
writeln('');
end;
end;
'2' : begin
writeln('***Anda memilih menu 2***');
writeln('<<>>');
write('masukkan angka:');readln(n);
For I:=1 to n do
begin
For J:=1 to I do
begin
write(' * ');
end;
writeln(' ');
end;
end;
'3' :begin
writeln('bye bye');
readln;
writeln;exit;readln;
end;
else
begin
writeln('Anda salah memasukkan angka');
end;
(*end case of*)
end;
writeln(' ');
writeln('tekan Enter untuk melanjutkan');
readln;
clrscr;
Goto menu;
end.
Gotoxy(30,12); writeln('1. Segitiga');
Gotoxy(30,14); writeln('2. Segitiga Bintang');
Gotoxy(30,16); writeln('3. Exit');
Gotoxy(30,18); write('Yang anda pilih: '); readln(pil);
clrscr;
case pil of
'1' : begin
writeln('***Anda memilih menu 1***');
writeln('<<
write('masukkan angka:');readln(a);
For I:=1 to a do
begin
For J:=1 to I do
begin
K:=I*j;
write(k,' ');
end;
writeln('');
end;
end;
'2' : begin
writeln('***Anda memilih menu 2***');
writeln('<<
write('masukkan angka:');readln(n);
For I:=1 to n do
begin
For J:=1 to I do
begin
write(' * ');
end;
writeln(' ');
end;
end;
'3' :begin
writeln('bye bye');
readln;
writeln;exit;readln;
end;
else
begin
writeln('Anda salah memasukkan angka');
end;
(*end case of*)
end;
writeln(' ');
writeln('tekan Enter untuk melanjutkan');
readln;
clrscr;
Goto menu;
end.
2 komentar:
xixi acik ne jd irg pertama yg coment.....
hhhehehehe...
blog kk ngebantu anin bgt...maksh ia... ^_^
dperbagus n diperlengkap lg ia ka...
suqsez buat kk...
ajarin anin ka...
byar anin jd jago jg ka....
ya ya ya ya ya ya...........
Manthao Boz..!!
Ini yang ane cari..!!
commandx apaan sich.!!
dosen ane dudut.. kagak di ajar2in..!!
Thank's banget yooooo....
Posting Komentar