Pascal Bab : 7 Pernyataan Perulangan Repeat…Until
Repeat….Until digunakan untuk mengulang (repeat) pernytaan sampai (until) kondisi diseleksi di Until tidak terpenuhi. Persamaan dengan while adalah dipakai untuk menangani pengulangan yang jumlahnya belum pasti.
Perbedaan antara Repeat….Until dengan While adalah
a ) Paling sedikitnya pernyataan didalam perulangan Repeat…Until diproses sekali, karena seleksi kondisi ada pada pernyataan Until yang terletak di bawah. Sedang pada struktur While paling sedikit dikerjakan nol kali, karena kondisi ada pada pernyataan while yang terletak di atas, sehingga kalau kondisi sudah tidak terpenuhi maka tidak akan masuk ke dalam lingkungan perulangan.
b ) pada Repeat….Until pada pernyataan boleh tidak menggunakan Begin End untuk menunjukan batas perulangan sudah ditunjukan oleh Repeat sampai dengan Until.
Contoh program menggunakan Repeat..Until adalah sebagai berikut :
Program contoh_repeat1;
Uses crt;
Var ulang : Integer;
Begin
Ulang:=0;
Repeat
Ulang:=ulang+1;
Writeln(ulang);
Until ulang=5;readln;
End.
Contoh program repeat menggunakan operator or
Program contoh_repeat2;
Uses crt;
Var ulang : char;
Begin
Repeat
Writeln(‘Pascal’);
Writeln(Diulang sampai ditekan huruf t’);
Readln(ulang);
Until (ulang=’T’)OR(ulang=’t’);
End.
makasih sangat membantu
Hi there other internet sites works good yet your site is running slowly which had taken around one minute
to actually load, I don’t know whether or not it’s
my own problem or maybe your site issue. Well, Thanks
for posting an extraordinarily lovely blog post. I believe it has
already been honestly beneficial to visitor who
seem to visit here. I am hoping I will be able to get
further remarkable content and I also should certainly flatter you simply
by telling you’ve done good job. To get more knowledge from content which you publish, I have added this page.
Hello there! Your webpage is loading slowly for me, the
site took sort of a minute or two to successfully reload, I dont know whether it is
just me or perhaps your web page on the other hand google and yahoo worked for me.
Nevertheless, I’d like to thank you for attaching awesome article.
I’m sure it has been extremely useful to individual who seem to visit here.
This is without a doubt wonderful what you have concluded and want to
discover even more nice articles from your website.
To get additional understanding by articles you publish, I actually have added this website.
Hey there Google and yahoo performs perfectly but your web
site is loading slowly which actually went on nearly a few minutes to
be able to load up, I am not sure if it’s my very own issue or maybe your website issue.
Well, Thank you for placing an extraordinarily lovely article.
I’m sure it really has been totally helpful to user who visit here.
I really hope I will be able to get even more awesome information and I
also should compliment you by telling you’ve done wonderful work.
I now have your site saved to my bookmarks to look at new stuff you post.
Hello there Your current web page starts up
seriously slow for my situation, I’m not sure who’s
problem is that although facebook starts relatively
good. Nevertheless, I want to thank you for placing beautiful post.
I do believe this has already been incredibly helpful user who seem to visit
here. This one is undoubtedly incredibly good everything
that you have implemented and would like to discover even more nice articles by
you. I ‘ve got you book-marked to check blog you publish.
Membantu banget. Tapi mau tanya dong, Saya ingin bikin program seperti ini dengan repeat … until. Bagaimana caranya ya?
1
1 2
1 2 3
1 2 3 4