全部问题 > 当前问题

这个程序变量还需要 i 吗?

#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);

}


呱呱 2016-2-15 19:29:37

共 1 个回答

嘿嘿大人 2016-2-15 19:44:38

没有用到就不需要撒

问题来自: 随机数