CS508 modern programing language Assignment no 1 solution spring 2021
Total marks 20 Due date 3/6/2021
Count vowels and consonants in snobol programing language
Assignment Solution:
* STUDENT ID: BC123445556
BEGIN
OUTPUT = 'Please Enter a String'
STRING = INPUT
OUTPUT = 'Input String:' STRING
* You can also change here change p1 and p2 to some other Names likes pattern1 2 or some others as you want
P1 = ('a' | 'e' | 'i' | 'o' | 'U' | 'A' | 'E' | 'I' 'O' | 'U') . V
p2 = ('b' | 'c' | 'd' | 'f' | 'g' | 'h' | 'j' | 'k' 'l' | 'm' | 'n' | 'p' | 'q' | 'r' | 's' | 't' | 'v' | 'w' 'x' | 'y' | 'z' | 'B' | 'C' | 'D' | 'F' | 'G' | 'H' | 'J' | 'K' 'L' | 'M' | 'N' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'V' | 'W' 'X' | 'Y' | 'Z') . C
* You can also change here change STR1 and 2 to some other Name
STR1 = ''
STR2 = ''
* also change Vowels and consonant to some other names
Vowels = 0
Consonants = 0
ALABEL STRING P1 = :F(BLABEL)
STR1 = STR1 '' V
Vowels = Vowels + 1 :S(ALABEL)
BLABEL STRING p2 = :F(RESULT)
STR2 = STR2 ' ' C
Consonants = Consonants + 1 :S(ALABEL)
* Here is the output results lines
RESULT OUTPUT = 'FOUND ' Vowels ' VOWELS ' STR1
OUTPUT = 'FOUND ' Consonants ' CONSONANTS ' STR2
END
0 Comments
thank you to visit this site