Upper and lower (Sample Programs)

by lrcvs, Friday, August 02, 2013, 17:26 (1451 days ago)

http://es.answers.yahoo.com/question/index;_ylt=AsDBm.yk9cVrONLW4WNFcLBp.gt.;_ylv=3?qid...

Free Traduction:


Upper and lower

I need enter a phrase and I return the first letter capitalized and lowercase next and so on.
eg "this is my sentence" I return "ThIs My SeNtEnCe"

::::::::::::::::::::::::::::::::::::::::::::::::::::
CLS
F$ = "Here are OTHER PHRASE Basic test"

L = LENGTH (F$)
Z$ = ""
C = 0
FOR N = 1 TO L
C = C + 1
J$ = MID(F$,N,1)
IF ASC (J$) = 32 THEN C = 0
IF C % 2 = 0 THEN
Z$ = Z$ + lower (J$)
ELSE
Z$ = Z$ + upper (J$)
END IF
NEXT N
print F$
PRINT Z$

END

::::::::::::::::::::::::::::::::::::::::::::::::::::::

Here are OTHER PHRASE Basic test

HeRe ArE OtHeR PhRaSe BaSiC TeSt

RSS Feed of thread
powered by my little forum