#include<iostream>
#include<string>
using namespace std;
void main()
{
int n=1;
string m;
while(n)
{
int a=2,b=3,j=1;
cout<<a<<"+"<<b<<"="<<a+b<<endl;
cout<<"程序继续 <Y/N> ?\n";
cin>>m;
while(j)
{
if(m!="N" || m!="Y" ||m!="n" || m!="y")
{
cout<<"输入错误,请重新输入\n";
cin>>m;
}
if(m=="N"||m=="n")
{
n=0;
j=0;
}
if(m=="Y"||m=="y")
{
n=1;
j=0;
}
}
}
}
#include<iostream>
#include<string>
using namespace std;
void main()
{
int n=1;
string m;
while(n)
{
int a=2,b=3,j=1;
cout<<a<<"+"<<b<<"="<<a+b<<endl;
cout<<"程序继续 <Y/N> ?\n";
cin>>m;
while(j)
{
if(m!="N" || m!="Y" ||m!="n" || m!="y")
{
cout<<"输入错误,请重新输入\n";
cin>>m;
}
if(m=="N"||m=="n")
{
n=0;
j=0;
}
if(m=="Y"||m=="y")
{
n=1;
j=0;
}
}
}
}
#include<string>
using namespace std;
void main()
{
int n=1;
string m;
while(n)
{
int a=2,b=3,j=1;
cout<<a<<"+"<<b<<"="<<a+b<<endl;
cout<<"程序继续 <Y/N> ?\n";
cin>>m;
while(j)
{
if(m!="N" || m!="Y" ||m!="n" || m!="y")
{
cout<<"输入错误,请重新输入\n";
cin>>m;
}
if(m=="N"||m=="n")
{
n=0;
j=0;
}
if(m=="Y"||m=="y")
{
n=1;
j=0;
}
}
}
}
#include<iostream>
#include<string>
using namespace std;
void main()
{
int n=1;
string m;
while(n)
{
int a=2,b=3,j=1;
cout<<a<<"+"<<b<<"="<<a+b<<endl;
cout<<"程序继续 <Y/N> ?\n";
cin>>m;
while(j)
{
if(m!="N" || m!="Y" ||m!="n" || m!="y")
{
cout<<"输入错误,请重新输入\n";
cin>>m;
}
if(m=="N"||m=="n")
{
n=0;
j=0;
}
if(m=="Y"||m=="y")
{
n=1;
j=0;
}
}
}
}





