[Courses] re: [C] lesson 7

Eugene Teo eugene.teo at eugeneteo.net
Tue Nov 5 19:37:22 EST 2002


just a note, if you look at dictionaries, consonants are not just aeiou
:) it is the sounds of the letters that you should use to decide if it
is vowel or consonants. sorry for being a little erm... :P

Eugene

<quote who="Morgon Kanter">
u> Hello,
u> 
u> After doing the lesson 7 excercises, I thought it would be a good idea to 
u> make a header file of some of the common stuff we'd been doing. So here is 
u> one of the excercises.
u> 
u> char consonent_or_vowel(char letter) {
u>  char returnchar[10];
u> 
u>  switch (letter) {
u>   case a:
u>   case A:
u>   case e:
u>   case E:
u>   case i:
u>   case I:
u>   case o:
u>   case O:
u>   case u:
u>   case U:
u>    returnchar = "consonent";
u>    break;
u>   default:
u>    returnchar = "vowel";
u>    break;
u>   }
u>  return returnchar;
u> }
u> 
u> If I made an error, please let me know.
u> -- 
u> Get my public key at http://www.surgo.net/pubkey.asc
u> _______________________________________________
u> Courses mailing list
u> Courses at linuxchix.org
u> http://mailman.linuxchix.org/mailman/listinfo/courses

-- 
eMail: eugeneteo at eugeneteo.net, eugeneteo at null.cc.uic.edu
gpg pub_key: http://null.cc.uic.edu/~eugeneteo/eugeneteo.asc
main(i){putchar(182623909>>(i-1)*5&31|!!(i<7)<<6)&&main(++i);}




More information about the Courses mailing list