Thursday, May 16, 2013

PENGGUNAAN IF ENDIF

 x=thisform.text1.Value
if VAL(x)=>60 then
        y="Lansia"
else
       if VAL(x)=>21 and VAL(x)<60 then
                    y="Dewasa"
       else
              if VAL(x)=>17 and VAL(x)=<20 then
                         y="Remaja"
               else
                         if VAL(x)=>5 and VAL(x)<17 then
                                    y="Anak-anak"
                         else
                                    if VAL(x)<5 then
                                               y="Balita"
                                    endif
                         endif
             endif
       endif
endif

No comments: