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