Public feed
#723819
// Pig Latin
#include<iostream>
using namespace std;
int main()
{
char word[11], pigword[11], pre[3];
cout << "Enter a word to translate to Pig Latin." <<endl;
cin >> word;
for(int x=0; x < 3; x++)
switch(word[x])
{
case'a':case'e':case'i':case'o':case'u':
if(x==1) {
pre[0]=word[0];
{
if(x==2) {
pre[0]=word[0];
pre[1]=word[1];
{
if(x==3) {
pre[0]=word[0];
pre[1]=word[1];
pre[2]=word[2];
}
}
for(int i=x; i<=11; i++) { pigword[i-x] = word[i]; }
{
break;
}
}
cout<<pigword<<pre<<"ay"<<endl;
return 0;
}
c:\documents and settings\administrator\my documents\visual studio 2008\projects\pig latin\pig latin.cpp(55) : fatal error C1075: end of file found before the left brace '{' at 'c:\documents and settings\administrator\my documents\visual studio 2008\projects\pig latin\pig latin.cpp(25)' was matched