vowel recognition print 2 lines i wrote this out.

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators: Administrator, Global Moderator

Post Reply
User avatar
blackgold
Newbie
Posts: 5
Joined: Wed Oct 15, 2003 4:18 am
Location: ireland
Contact:

vowel recognition print 2 lines i wrote this out.

Post by blackgold »

Code: Select all

CLS
COLOR 2
INPUT "Type something: ", s$ 
v$ = s$ 
c$ = s$ 
FOR i% = 1 TO LEN(c$) 
IF MID$(s$, i%, 1) = "a" OR MID$(s$, i%, 1) = "e" OR MID$(s$, i%, 1) = "i" OR MID$(s$, i%, 1) = "o" OR MID$(s$, i%, 1) = "u" OR MID$(s$, i%, 1) = "y" THEN 
MID$(c$, i%, 1) = " " 
ELSE 
MID$(v$, i%, 1) = " " 
END IF 
NEXT i% 
PRINT LCASE(v$) 
PRINT LCASE$(c$) 
This is my code .

It print's out 2 lines one with vowels and one with normal alphabit
I have one problem i need it to print in lcase but it doesn't it prints only the secound line only .
Any ideas?
User avatar
frankiebaby
Global Moderator
Posts: 95
Joined: Tue Apr 30, 2002 1:38 am
Location: Pennsylvania
Contact:

Re: vowel recognition print 2 lines i wrote this o

Post by frankiebaby »

END IF  
NEXT i%  
PRINT LCASE(v$) &nbsp; &nbsp; &nbsp; << < TAKE A LOOK AT THIS
PRINT LCASE$(c$) &nbsp;
User avatar
blackgold
Newbie
Posts: 5
Joined: Wed Oct 15, 2003 4:18 am
Location: ireland
Contact:

Re: vowel recognition print 2 lines i wrote this o

Post by blackgold »

I tried it and i get missmatch.?
Any ideas?
I tried this way but no luck i get the vowels seperated but the lcase$ does not work.
PRINT LCASE$(v$); (c$)

Thanks.
P.s. if you have any good tuts i should read please help me out .
User avatar
frankiebaby
Global Moderator
Posts: 95
Joined: Tue Apr 30, 2002 1:38 am
Location: Pennsylvania
Contact:

Re: vowel recognition print 2 lines i wrote this o

Post by frankiebaby »

ok, the LCASE$ isnt working for the second statement, the c$, correct? its becuase it is not in the LCASE$ parameters, try this:

LCASE$(V$ + " " + C$)
Post Reply