1:56 PM
C++ Program to DELETE THE VOWELS FROM A STRING

Write a Program to DELETE THE VOWELS FROM A STRING

#include<iostream.h> 
#include<conio.h> 
 
void main()
{
char str[20],s[20];
int i,j=0;
clrscr();
printf("Enter any string->");
scanf("%s",str);
printf("The string is->%s",str);
for(i=0;i<=strlen(str);i++)
{
if(str[i]=='a'||str[i]=='e'||str[i]=='i'||str[i]=='o'||str[i]=='u')
str[i]=' ';
else
s[j++]=str[i];
}
s[j]='\0';
printf("\nThe string without vowel is->%s",s);
getch();
}
 
 
 
Note:
      If you want to change in this program please write through the comment on this page. you can also past similar program 
                 of c++ with output.your comment is valuable to the other user and person.
 
Views: 97 | Added by: vijoriya | Tags: DELETE, String, c++, VOWELS, program | Rating: 0.0/0
Total comments: 0
avatar