Sunday 8 April 2012

14).Check Vowel Using Switch Statement.

#include<conio.h>
#include<stdio.h>
#include<iostream.h>
void main()
{
   clrscr();
   char ch;
   cout<<"Enter a Charecter";
   cin>>ch;
   switch(ch)
   {
   case'a':
   case'A':
   case'e':
   case'E':
   case'i':
   case'I':
   case'o':
   case'O':
   case'u':
   case'U':
   cout<<"Charecter vowel";
   break;
   default:
   cout<<"Charector is consonent";
 }


       getch();

}

1 comment:

Write a program which reads a set of integers into an integer array and then prints "YES"if all of them are same otherwise print "NO".

#include<stdio.h> int main() { int a[10],M=0,i,n; printf("enter a value for n\n"); scanf("%d",&n); fo...