Menghitung Bilangan Genap
20:41 | Author: Joker


Algoritma:
1 int i = 0, x = 0,n

2 Tanya banyak jumlah data masukan ke variabel n

3 Proses looping
a. Untuk i =1 sampai n
b. Jumlahkan x dengan x = x+2
c. Hitung y dengan y =x / 4

4 Tanya apakah modulus y sama dengan 0

5 Bila ”yes” maka kembali ke proses b.

6) Bila ”no” maka cetak x
|
This entry was posted on 20:41 and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

0 komentar: