看板 FJU-Stat94B 關於我們 聯絡資訊
期末考 第三組 剛剛有人來問 我就寫了一下 #include<iostream> #include<time.h> using namespace std; int main() { srand((unsigned)time(NULL)); double U[10]; for(int times=1;times<=10;times++) { for(int i=0;i<=9;i++) { U[i]=rand()%10; cout<<U[i]<<" "; } cout<<endl; sort(U,U+10); for(int j=0;j<=9;j++) { cout<<U[j]<<" "; } cout<<endl<<endl; } cin.get(); } -- 霞乃雲魄魂蜂是花精神 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.216.141.175
Falconeye:我寫看10次...看1000次自己改times 01/13 23:01
dou0905:高手!呵... 01/14 00:54