Program No : 12 :

Write a program in C to find smallest of three numbers using ternary operator ?

       program no  :12
purpose : display the given character vowel or not

#include <"stdio.h">
void main()
{

	char vowel;

	scanf("%c",&vowel);

	switch(vowel)
	{
		case 'a':
		case 'A':
			printf("%c is voewl",vowel);
			break;

		case 'e':
		case 'E':
			printf("%c is voewl",vowel);
			break;

		case 'i':
		case 'I':
			printf("%c is voewl",vowel);
			break;

		case 'o':
		case 'O':
			printf("%c is voewl",vowel);
			break;

		case 'u':
		case 'U':
			printf("%c is voewl",vowel);
			break;

		default :
			printf("%c is not a vowel",vowel);
	}

}  



Back