yang lebih unik lagi progi yg gw buat ni bisa menampilkan bil FPB dari bil yg dimasukkan
dim temp(100)
dim tmp(100)
dim ang(100)
cls
'a,b,c,d,e,x,temp
temp(1)=2
e=2
a=100
for b= 3 to a
for c=2 to b-1
if b mod c <> 0 and b mod 1=0 then
temp(e)=b
d=b
else
if b<>d then
e=e+1
elseif b=d then
temp(e)=0
e=e-1
end if
goto lompat
end if
next c
lompat:
next b
'for x=1 to e
' print "Hasil : " +str$(temp(x))
'next x
'cls
f=1
g=1
locate 2,25:print " FPB "
locate 3,25:print "================"
locate 4,25:print "Angka ="
locate 5,25:print "================"
locate 4,33:input,angka
locate 8,28:print str$(angka)
do while angka <> temp(f)
if angka mod temp(f)=0 then
tmp(g)=temp(f)
angka=angka \ temp(f)
ang(g)=angka
g=g+1
elseif angka mod temp(f)<>0 then
f=f+1
end if
loop
if angka=temp(f) then
tmp(g)=angka
ang(g)=angka
end if
for i=1 to g-1
locate 7+i*2,28+i*2:print "\"+str$(ang(i))
locate 7+i*2,25+i*2:print str$(tmp(i))+"/"
next i
1 comment:
شركة تنظيف مسابح شرق الرياض
شركة تنظيف مسابح شمال الرياض
شركة تنظيف مسابح غرب الرياض
شركة تنظيف مسابح جنوب الرياض
شركة صيانة مسابح بالرياض
شركة صيانة مسابح شرق الرياض
شركة صيانة مسابح شمال الرياض
شركة صيانة مسابح غرب الرياض
شركة صيانة مسابح جنوب الرياض
شركة مكافحة النمل الابيض جنوب الرياض
شركة مكافحة النمل الابيض شمال الرياض
شركة مكافحة النمل الابيض وسط الرياض
Post a Comment