Halloween party ideas 2015

1: Program JenisBilangan;
 2: var bil: longint;
 3: begin
 4:   writeln('MENENTUKAN JENIS BILANGAN');
 5:   writeln('-------------------------');
 6:   write('Masukkan angka: ');readln(bil);
 7:   if ((bil=2) or (bil=3) or (bil=5) or (bil=7)) then
 8:     write('bilangan prima')
 9:   else if ((bil mod 2 <> 0) and (bil mod 3 <> 0) and
        (bil mod 5 <> 0) and (bil mod 7 <> 0)) then
10:     write('bilangan prima')
11:   else write('bukan bilangan prima');
12:   if bil mod 2 = 0 then
13:     writeln(' dan genap')
14:   else
15:     writeln(' dan ganjil');
16:   readln;
17: end.

Post a Comment

This blog needed you to understand the word spam - never spam on this blog, although i will not moderate all of it, but you will learn it yourself, educate yourself

Powered by Blogger.