2007/06/13 | 有关一些C++的与或非的基本用法
类别(计算机与编程) | 评论(0) | 阅读(883) | 发表于 15:39

//2007.06.13.check or || , and && , not ! ,
//goddamn ***... wangs.teams

#include <iostream>
#include <string>
using namespace std;

main()

{
 bool user_more;
 char user_sp;

loop : for (int nn=1;nn<400000000;nn++)
    {
     if (nn%10000000==0)
     {
      cout<<"<<";
     }
    };
 cout<<endl;
 cout<<"do you want to check it again? "<<endl;
 cin>>user_sp;
// cout<<endl;

 if (user_sp=='Y'||user_sp=='y') //remember that,if using the equality,you must use "single quote"! 
 {
  user_more=true;
 }
 else
 {
  user_more=false;
 }
//................................................
 if (user_more == true)
 {
  cout<<"user_more is true..."<<endl; 
 }
 else
 {
  cout<<"user_more is false..."<<endl;
 }
 goto loop;
 return 0;
}

0

评论Comments

日志分类
首页[666]
计算机与编程[133]
EMU[40]
UFOs[24]
房产[127]
音乐[13]
LOG[0]
经济[120]
影视[3]
物理[7]
数学[8]
社会[105]
职场[9]
生物医学[18]
生活[59]