Question: #include #include using namespace std; int main ( ) { / / declaring an stl string and taking input from user string str; cin >
#include
#include
using namespace std;
int main
declaring an stl string and taking input from user
string str;
cin str;
store first character of the string into another variable
char x str;
if the character is a vowel, add "way" to the end of the string
if x a x e x i x o x u
string tempway;
str str temp;
else delete the first character and add it at the end along with string ay
else
strerase;
strpushbackx;
str str ay;
print the string
cout str;
systemPause;
return ;
The assignment asks you to convert entire sentences into pig latin, rather than a single word. You'll want to find a way to store the entire sentence somewhere, and then convert each word in that sentence to pig latin, replacing them as you go
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
