Home > Back-end >  And not a pig is pig
And not a pig is pig

Time:11-18

# include
# include
using namespace std;

Int main ()
{
String a;
Cin & gt;> A. & gt;> Endl;
If (a=="pig") cout & lt; The else cout & lt; return 0;
}

CodePudding user response:

This is to say, to see your console code and your files are consistent coding (multibyte characters and coding related)

CodePudding user response:

The same computer,

CodePudding user response:

A keyboard, a mouse

CodePudding user response:

A screen are all the same

CodePudding user response:

The cin & gt;> A. & gt;> Endl; & gt;> Endl delete, because is input, the output is not,

CodePudding user response:

Wstring
Wcin
Wcout
Wcin. Imbue (locale (" CHS "));
Wcout. Imbue (locale (" CHS "));

CodePudding user response:

 # include 
# include
using namespace std;

Int main ()
{

Wcin. Imbue (locale (" CHS "));
Wcout. Imbue (locale (" CHS "));
Wstring a;
Wcin & gt;> A. & gt;> Endl;
If (a==L "pig") wcout & lt; The else wcout & lt; return 0;
}

CodePudding user response:

Cin in less than endl, input is not output
  • Related