A very simple code that I wrote that will insert three asterisk in a given string in C++ I wrote this code around 7 years ago in my C++ programming class.
programming projects , thesis and capstone projects, IT consulting
work, computer tutorials and web development work kindly contact me in the following email address for further details. If you want to advertise in my website kindly contact me also in my email address also. Thank you.
#include<iostream>
#include<string>
using namespace std;
int main(){
string str;
int x;
cout << "\n\n\t\t Insert Three Asterisk Version 1.0";
cout << "\n\n\t Created By: Mr. Jake R. Pomperada, MAED-IT";
cout << "\n\n";
cout<<"Enter a word: ";
getline(cin, str);
x = str.length() / 2;
cout << "\n\nOriginal String :=> " << str;
str.insert(x, "***");
cout << "\n\n";
cout << "After the Process :=> " << str;
cout << "\n\n";
system("pause");
return 0;
}
I am currently accepting programming work, it project, school
programming projects , thesis and capstone projects, IT consulting
work, computer tutorials and web development work kindly contact me in the following email address for further details. If you want to advertise in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.com, jakerpomperada@aol.com and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
My personal website is http://www.jakerpomperada.com
My personal website is http://www.jakerpomperada.com
Program Listing
#include<iostream>
#include<string>
using namespace std;
int main(){
string str;
int x;
cout << "\n\n\t\t Insert Three Asterisk Version 1.0";
cout << "\n\n\t Created By: Mr. Jake R. Pomperada, MAED-IT";
cout << "\n\n";
cout<<"Enter a word: ";
getline(cin, str);
x = str.length() / 2;
cout << "\n\nOriginal String :=> " << str;
str.insert(x, "***");
cout << "\n\n";
cout << "After the Process :=> " << str;
cout << "\n\n";
system("pause");
return 0;
}