//Program to print
the string with or without vowels
#include<stdio.h>
#include<conio.h>
#include<string.h>
void
main()
{
int
i,j=0;
char
t1[20],t2[20];
clrscr();
printf("Enter
the text below\n");
gets(t1);
for(i=0;i<20;i++)
{
if(t1[i]=='a'|t1[i]=='e'|t1[i]=='i'|t1[i]=='o'|t1[i]=='u'|t1[i]=='A'|t1[i]=='E'|t1[i]=='I'|t1[i]=='O'|t1[i]=='U')
continue;
else
{
t2[j]=t1[i];
j++;
}
}
printf("\nText
with vowels=%s",t1);
printf("\nText
without vowels=%s",t2);
getch();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.