int
带我走@ 核心会员 2016-02-26 12:22:56
2713 3 0

#include<stdio.h>

#include<stdlib.h>

#include<time.h>

main()

{

int t,i,a,b;

time(&t);

srand(t);

a=rand()%100;

b=rand()%100;

printf("a=%d\nb=%d\n",a,b);

printf("a+b=%d",a+b);

}

这个程序报错为啥提示吧int换成long,才能运行??


问题来自: 随机数

共 3 个回答

您还没有登录,所以不能回复该问题
我要回复

  • 0

    点赞

  • 扫一扫分享朋友圈

    二维码

  • 分享

相关问题