如何用DEV c++编猜数程序(也称猜数字游戏)

[复制链接]
查看11 | 回复1 | 2011-8-13 03:46:57 | 显示全部楼层 |阅读模式
我的DEV c++是第五版的 即DEV c++5
最好能有限制次数的那种程序

回复

使用道具 举报

千问 | 2011-8-13 03:46:57 | 显示全部楼层
以下代码在 Dev-C++ 4.9.9.6 release 上编译通过,望采纳#include #include using namespace std;string Number1, Number2;string GenerateNumber(){srand((unsigned)time(NULL));string Result="xxxx";int c=0,k=0;char v;bool f=false;for(int i=0;i<4;i++){f=false;while(!f){k=0;v=rand()%10+'0';for(...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行