用c语言编写:首先由电脑产生4个随机数(10以内),再由用户输入4个数,也是10以内,例如。。。

[复制链接]
查看11 | 回复2 | 2012-5-31 00:35:38 | 显示全部楼层 |阅读模式
/*测试环境Ubuntu12.04
编译器gcc
*/#include#include#includeint fun(int[4]);
//判断是否有重复void judge(int[4],int[4]); //判断几阴几阳int main(int argc,char *argv[]){int data_1[4],data_2[4];int k=0,count=1;time_t t;srand((unsigned)time(&t));for(;k#include...
回复

使用道具 举报

千问 | 2012-5-31 00:35:38 | 显示全部楼层
#include#includeint main(){int i;int yin = 0;int yang = 0;unsigned seed;printf("please input seed\n");scanf("%d",&seed);srand(seed);...
回复

使用道具 举报

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

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行