C語言實現隨機生成0~100的數

#include <iostream> #include <time.h> int main() { srand((unsigned)time(NULL));//srand()就是給rand()提供種子seed for (int i = 0; i < 100; i++) { int num = rand()%100;//對100取餘操做
相關文章
相關標籤/搜索