A program that I wrote in C++ that will ask the user to give a string and then the program will delete the vowels in the given string by the user.

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================



Want to support my channel?

GCash Account

Jake Pomperada


09173084360



Paypal

https://paypal.me/jakerpomperada



Patreon

https://www.patreon.com/jakerpomperada





Thank you very much for your support.
Program Listing
	
#include <iostream>
#include <conio.h>
#include <string.h>


using namespace std;

int main()
{

	char str[100];
	int chk=0, i=0, j=0;
	
	cout <<"\n\n";
	cout <<"\tDelete The Vowels in a String in C++\n\n";
	cout<<"\tGive a string : ";
	gets(str);
	while(str[i]!='\0')
    {
        chk=0;
        if(str[i]=='a'||str[i]=='e'||str[i]=='i'||str[i]=='o'||str[i]=='u'||
           str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U')
        {
            j=i;
            while(str[j-1]!='\0')
            {
                str[j] = str[j+1];
                j++;
            }
            chk = 1;
        }
        if(chk==0)
            i++;
    }
	cout <<"\n\n";
	cout<<"\tAfter removing the vowels : \n\n";
	cout <<"\t"<<str;
	cout <<"\n\n";
	cout <<"\tEnd of Program";
	cout <<"\n";
	getch();
}

Leave a Reply

Your email address will not be published. Required fields are marked *