Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2342171
  • 博文数量: 816
  • 博客积分: 10000
  • 博客等级: 上将
  • 技术积分: 5010
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-17 17:57
文章分类

全部博文(816)

文章存档

2011年(1)

2008年(815)

分类:

2008-12-17 18:01:58

include

int main()
{
cout<<"Decryptix.(c)copyright 1999 Diberty";
cout<<"Associates,inc.version 0.2\n"<< endl;
cout<<"there two ways to play Decryptix: ";
    cout<<"eight you can guess a pattern i create, ";
cout<<"or i can guess your pattern.\n\n";

cout<<"if you are guessing,i will think of a\n";
    cout<<"pattern of letters (e.g., abcde).\n\n";

cout<<"on each turn,you guess the pattern and\n";
cout<<"i will tell you hoe many letters you \n";
cout<<"got right,and how many of the correct\n";
cout<<"letters were in the correct position.\n\n";

cout<<"the gole is to decode the puzzle as quickly\n";
cout<<"as possible.You control how many letters \n";
    cout<<"Can be used and how many positions\n";
cout<<"(e.g.,5 possible letters in 4 positions) \n";
cout<<"as well as whether or noe the pattern might\n";
cout<<"contain duplicate letters (e.g.,aabcd).\n\n";

cout<<"if i'm guessing,you think of a pattern \n";
cout<<"and score each of my answers.\n\n";<< endl;

const int minLetters=2;
const int maxLetters=10;
const int minPositions=3;
const int maxPositions=10;
int howManyLetters=0, howManyPositions=0;
bool duplicatesAllowed=false;
int round=1;

cout<<"How many letters?(";
cout<<"minLetters <<"-"<< maxLetters << "): ";
cin >> howManyLetters;

cout<<"How many positions? (";
cout<<"minPositions << "-" << maxPositions << "): ";
cin >> howManyPositions;

char choice;
cout<<"Allow duplicates (y/n)? ";
cin >> choice;

return 0;
}

--------------------next---------------------

阅读(1051) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~