鱼C论坛

 找回密码
 立即注册
查看: 3696|回复: 8

现实中的一道题

[复制链接]
发表于 2014-2-16 23:41:04 | 显示全部楼层
#include<stdio.h>
#include<windows.h>
#include<time.h>
int u, po[]={0,1,2,3,4,5,6,7,8,9};

void main()
{
        for(int x=0;x<500;x++)
        {

                                for(int w=0;w<3;w++)
                                {
                                        srand((unsigned) time(NULL));
                                        u= rand()%9;
                                        Sleep(1000);
                                        printf("%d \t",po[u]);

                                }
                                printf("\n");
        }
}
给个源码给你参考  IF条件 你可以根据需要而变
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

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

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-10-13 06:31

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表