rss
Twitter Delicious Facebook Digg Stumbleupon Favorites

Thursday, October 13, 2011

Check how many vowels and consonants

In phonetics, a vowel is a sound in spoken language, such as English ah! [ɑː] or oh! [oʊ], pronounced with an open vocal tract so that there is no build-up of air pressure at any point above the glottis. This contrasts with consonants, such as English sh! [ʃː], where there is a constriction or closure at some point along the vocal tract. A vowel is also understood to be syllabic: an equivalent open but non-syllabic sound is called a semivowel.

In all languages, vowels form the nucleus or peak of syllables, whereas consonants form the onset and (in languages that have them) coda. However, some languages also allow other sounds to form the nucleus of a syllable, such as the syllabic l in the English word table [ˈteɪ.bl̩] (the stroke under the l indicates that it is syllabic; the dot separates syllables), or the r in Serbo-Croatian vrt [vr̩t] "garden".
There is a conflict between the phonetic definition of "vowel" (a sound produced with no constriction in the vocal tract) and the phonological definition (a sound that forms the peak of a syllable). The approximants [j] and [w] illustrate this conflict: both are produced without much of a constriction in the vocal tract (so phonetically they seem to be vowel-like), but they occur on the edge of syllables, such as at the beginning of the English words "yet" and "wet" (which suggests that phonologically they are consonants). The American linguist Kenneth Pike suggested the terms 'vocoid' for a phonetic vowel and "vowel" for a phonological vowel,so using this terminology, [j] and [w] are classified as vocoids but not vowels.
The word vowel comes from the Latin word vocalis, meaning "speaking", because in most languages words and thus speech are not possible without vowels. In English, the word vowel is commonly used to mean both vowel sounds and the written symbols that represent them.

class Vowel
{
public static void main(String args[])
{
String a="Saumav";
char d;
int b,v=0,x=0;
int c=a.length();
for(b=0;b<=c-1;b++)
{
d=a.charAt(b);
if
(d=='a' || d=='A' || d=='e' || d=='E' || d=='i' || d=='I' || d=='o' || d=='O' || d=='u' || d=='U'){
v++;
}
else
{
x++;
}
}
System.out.println("The no of vowels are"+v);
System.out.println("the no of consonants are"+x);
}
}


Write a program to find out power of any given number.
class Power
{
public static void main(String args[])
{
double b=64;
double x;
x=Math.pow(b,2);
System .out.println("the 2 power is"+x);
}
}

0 comments:

Post a Comment

Powered by Blogger.