Create a program that prompts the user for their first name, then displays it with asterisks between each letter. Do not include an asterisk in the beginning nor the end.
For example, Sharon would be displayed as: S*h*a*r*o*n .
Here is what I have so far:
#include <cmath>
#include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;
string populate(string array1[], int number);
int main()
{
string tscore[26]={};
populate(tscore,26);
system("pause");
return 0;
}
string populate(string array1[], int number)
{
string input;
int i;
cout << "Please enter your name ";
cin >> input;
{
cout << "Your name is: " << endl;
cout << input;
for(i=0;i<=1;i++)
cout << "*";
array1[i]=input;
}
system("pause");
return EXIT_SUCCESS;
}