Home  |  IT Zone  |  Tips / Tricks  |  Did You Know  |  Inspirational  |  Health  |  World Infos  |  Insurance  |  Universities  |  Forex  |  Mathematics  |  Illusions  |  Children Day Quotes  |  Fun / Jokes  |  Decent Quotes  |  Birthday Msgs  |  Good Morning Msgs  |  Good Night Msg  |  Husband Wife Jokes  |  Teacher Students Jokes  |  Insult Jokes  |  Love Quotes  |  Sad Quotes  |  Funny Pics  |  Be Aware  |  Articles  |  Simple Joys of Life 

A Program to input a word and count total number of alphabet 'A' in the input word.

 A Program to input a word and count total number of alphabet 'A' in the input word. (Qbasic Code)

CLS
INPUT "Enter a word"; w$
w$ = UCASE$(w$)
x = LEN(w$)
FOR i = 1 TO x
    x$ = MID$(w$, i, 1)
    IF x$ = "A" THEN
        c = c + 1
    ELSE
    END IF
NEXT i
PRINT "The total number of A is"; c
END

Share :

Twitter
Back To Top

facebook main

Powered by Blogger.