#include<stdio.h>
#include<conio.h>
void main()
{
char a[21];
int j,i;
clrscr();
printf("\n ************************************************\n");
printf("\n Please Give The STRING OF A : ");
scanf("%s",a);
flushall();
for(i=0,j=0;a[i]!='\0';i++)
{
if(a[i]=='a'|| a[i]=='A')
j++;
if(a[i]=='e'|| a[i]=='E')
j++;
if(a[i]=='i'|| a[i]=='I')
j++;
if(a[i]=='o'|| a[i]=='O')
j++;
if(a[i]=='u'|| a[i]=='U')
j++;
}
printf("\n TOTAL NO. OF VOVELS ARE %d.",j);
getch();
}
#include<conio.h>
void main()
{
char a[21];
int j,i;
clrscr();
printf("\n ************************************************\n");
printf("\n Please Give The STRING OF A : ");
scanf("%s",a);
flushall();
for(i=0,j=0;a[i]!='\0';i++)
{
if(a[i]=='a'|| a[i]=='A')
j++;
if(a[i]=='e'|| a[i]=='E')
j++;
if(a[i]=='i'|| a[i]=='I')
j++;
if(a[i]=='o'|| a[i]=='O')
j++;
if(a[i]=='u'|| a[i]=='U')
j++;
}
printf("\n TOTAL NO. OF VOVELS ARE %d.",j);
getch();
}
Outeput:
Please Give The STRING OF A : Hello Hii
TOTAL NO. OF VOVELS ARE 4.
Please Give The STRING OF A : Hello Hii
TOTAL NO. OF VOVELS ARE 4.
0 Comments