All pastes #487268 Raw Edit

phil

public text v1 · immutable
·published 2007-05-14 11:06 UTC
rendered paste body
#Program 2
clear
echo Enter the string
read str
len=`expr length $str`

i=1
count=0

while [ $i -le $len ]
do
	char=`echo $str | cut -c $i`
	case $char in
	a|e|i|o|u) count=`expr $count + 1`;;
	A|E|I|O|U) count=`expr $count + 1`;;
	esac
	i=`expr $i + 1`
done
echo Total number of vowels are $count