您的位置:首页 > 编程语言 > C语言/C++

2_i love you.cpp

2012-10-15 11:57 211 查看
#include <iostream>

using namespace std;

int main()
{	
	char y;
	char x, z;
	x = 3;
	z = 1;

	cout<<'\t'<<'\t'<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<endl;
	cout<<'\t'<<'\t'<<x<<'\t'<<'\t'<<"I ";
	cout<<"love ";
	cout<<"you!"<<'\t'<<'\t'<<' '<<' '<<x;
	cout<<endl;
	cout<<'\t'<<'\t'<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<x<<endl;
	cout<<endl;
	cout<<'\t'<<'\t'<<'\t'<<'\t'<<"Do you love me?"<<endl;
	cout<<'\t'<<'\t'<<'\t'<<'\t'<<"   (Y or N)"<<endl;
	fanhui:
	cin>>y;

	if (y=='Y'||y=='y')//注意,这是一个要点!!
	{
		cout<<'\t'<<'\t'<<'\t'<<"    "<<x<<"I love you in my life!"<<x<<endl<<endl;
        cout<<'\t'<<'\t'<<'\t'<<"           "<<x<<x<<"     "<<x<<x<<"    "<<endl;
		cout<<'\t'<<'\t'<<'\t'<<"          "<<x<<"   "<<x<<' '<<x<<"   "<<x<<endl;
		cout<<'\t'<<'\t'<<'\t'<<"          "<<x<<"    "<<x<<"    "<<x<<endl;
		cout<<'\t'<<'\t'<<'\t'<<"           "<<x<<"       "<<x<<endl;
		cout<<'\t'<<'\t'<<'\t'<<"             "<<x<<"   "<<x<<endl;
		cout<<'\t'<<'\t'<<'\t'<<"               "<<x<<endl;
		cin.get();
	}
	else if (y=='N'||y=='n')
	{
		cout<<'\t'<<'\t'<<'\t'<<"   "<<x<<"注意了!你选对了吗!嘿嘿~"<<'\a'<<x<<endl<<endl;
		cin.get();
		goto fanhui;
	}
	else 
	{
		cout<<'\t'<<'\t'<<"    "<<z<<z<<z<<"别耍赖,告诉我吧,反正我爱你了"<<z<<z<<z<<endl<<endl;
		goto fanhui;
	}

	cin.get();
	return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: