Computer Science, asked by sourajoy2020, 10 months ago

QBASIC-
WRITE THE VARIABLE DESCRIPTION OF THE GIVEN PROGRAM-
Write a Subroutine program to input a word and find-
a)No.of vowels
b) Sum of their ASCIl values
c) No. of times the letter P or p appears.




CLS
INPUT "Enter a word". A$
L=LEN (A$)
10 PRINT "ENTER 1. TO COUNT NUMBER OF VOWELS, 2. FOR
SUM OF THEIR ASCII VALUES, 3. NUMBER OF TIMES P OR p APPEARS"
INPUT "ENTER YOUR CHOICE";C
ON C GOSUB 20, 30, 40
INPUT "DO YOU WANT TO CONTINUE ? Y/N"; B$
IF B$="Y" OR B$"y" THEN GOTO 10 ELSE PRINT "THANK You"
END
20 FOR I=1 To L
C $ =MID$ (A $, I, 1)
IF C$= "A" OR C$="E" OR C$="I" OR C$="O" OR C$= "U" OR C$="a" OR C$="e" OR C $="i" OR C$="o" OR C$="u" THEN V = V+1
NEXT I
PRINT "NUMBER OF VOWELS=";V
RETURN​

Answers

Answered by Anonymous
0

Answer:

Write a function or program that checks whether a given sequence of characters (or, if you prefer, bytes) is a palindrome.

For extra credit:

Support Unicode characters.

Write a second function (possibly as a wrapper to the first) which detects inexact palindromes, i.e. phrases that are palindromes if white-space and punctuation is ignored and case-insensitive comparison is used.

Hints

It might be useful for this task to know how to reverse a string.

This task's entries might also form the subjects of the task Test a function.

Similar questions