<head>
<script language="VBS">
function ganjil(a,b)
dim hitung
hitung = ""
for p=a to b
if p mod 2 = 1 then
hitung = hitung & " " & p
end if
next
ganjil = hitung
end function
</script>
</head>
<body>
<script language="VBS">
x=cint(inputbox("masukkan X"))
y=cint(inputbox("masukkan Y"))
If x<y then
hasil = ganjil(x,y)
else
hasil = "ERROR"
end if
document.write hasil
</script>
</body>
</html>
<head>
<script language="VBS">
function carimax(h,i,j,k)
dim hitung
dim ab
dim abc
dim abcd
if h>i then
ab = h
else
ab = i
end if
if ab>j then
abc = ab
else
abc = j
end if
if abc>k then
abcd = abc
else
abcd = k
end if
hitung = abcd
carimax = hitung
end function
</script>
<script language="VBS">
function carimin(h,i,j,k)
dim hitung
dim ab
dim abc
dim abcd
if h<i then
ab = h
else
ab = i
end if
if ab<j then
abc = ab
else
abc = j
end if
if abc<k then
abcd = abc
else
abcd = k
end if
hitung = abcd
carimin = hitung
end function
</script>
<script language="VBS">
function perkalian(p,q,r,s)
dim hitung
hitung = carimax(p,q,r,s)*carimin(p,q,r,s)
perkalian = hitung
end function
</script>
</head>
<body>
<script language="VBS">
a=cint(inputbox("masukkan A"))
b=cint(inputbox("masukkan B"))
c=cint(inputbox("masukkan C"))
d=cint(inputbox("masukkan D"))
nilmin = carimin(a,b,c,d)
nilmax = carimax(a,b,c,d)
hasil = perkalian(a,b,c,d)
document.write "Nilai Min = " & nilmin & "</br>"
document.write "Nilai Max = " & nilmax & "</br>"
document.write "Hasil perkalian = " & hasil
</script>
</body>
</html>


22.43
AndriY


