13 May 2013

How to print characters in Vertically order


How to print characters in Vertically order

sName="venkat Kandula"
sName=Split(sName," ")

sFirstName=sName(0)
sSecondName=sName(1)

sFirstNameLenght=len(sFirstName)
sLastNameLenght=len(sSecondName)

If sFirstNameLenght>sLastNameLenght Then
nTotalCount=sFirstNameLenght
Else
nTotalCount=sLastNameLenght
End If


For i=1 to nTotalCount
If  i>sFirstNameLenght  Then
sFstNameCha=" "
Else
sFstNameCha=Mid(sFirstName,i,1)
    End If

If  i>sLastNameLenght  Then
sLstNameCha=" "
Else
sLstNameCha=Mid(sSecondName,i,1)
    End If

sFNChar=sFstNameCha& sLstNameCha & vbnewline
print sFNChar

Next

OR

str="java"

L=len(str)

For i=1 to L

x=mid(str,i,1)

y=x&Vbnewline&temp

print y

next

No comments:

Post a Comment