Professional Documents
Culture Documents
a=0
b=0
<script language="vbscript">
While a
>0
Cetak a
a=0
b=1
do
document.write a & ", "
a=a+b
b=b+1
loop while a > 0
a = a+ b
b=b+1
</script>
C3.
a.
b.
no
a=
100
a=a5 a <-
Write
a
c.
150
yes
-
Until
a=
100
While a>=150
Write a
A=a-5
C5.
a=1
b=1
<script language="vbscript">
a=1
b=1
do while a<=50
document.write b & " , "
a=a+1
b=b+a
loop
</script>
While a <=
50
Cetak b
a = a+ 1
b=b+a
C6.
<script language="vbscript">
for i =1 to 13
c=c+2^i
document.write 2^i & " + "
next
document.write "<br>" & "Nilai deret = "
&c
</script>
C7.
<script language="vbscript">
a=cint(inputbox("Masukkan bilangan"))
b=1001
for i=0 to a
b=b+(-1^(i+1))*(2^i)
next
document.write "Nilai deret = " & b
</script>
N
Y