Turbo C/C++ 以產生10個介於0~99之間的亂數為例
#include<stdio.h>
#include<stdlib.h>
int main(){
	int a,times=0;
	randomize();
	while(times<=10){
		a=random(100);
		printf("%d\n",a);
		times++;
	}
puts("\n");
return 0;
}
文章標籤
全站熱搜
創作者介紹
創作者 JL8051 的頭像
JL8051

不會的就放這邊

JL8051 發表在 痞客邦 留言(0) 人氣(54)