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;
}
arrow
arrow
    文章標籤
    亂數 Turbo C
    全站熱搜

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