Qbasic Program to print a sentence in title case.
Posted by Mahibabu
REM Program to print the given sentence into titlecase
CLS
INPUT "Enter a sentence"; s$
b$ = UCASE$(MID$(s$, 1, 1))
w$ = w$ + b$
FOR i = 2 TO LEN(s$)
IF RIGHT$(w$, 1) = " " THEN
b$ = UCASE$(MID$(s$, i, 1))
ELSEb$ = LCASE$(MID$(s$, i, 1))
END IF
w$ = w$ + b$
NEXT i
PRINT w$
END