[問題] 請問怎樣劃出這個流程圖
( *[1m *[m 為色碼,可以按 Ctrl+V 預覽會顯示的顏色 )
( 未必需要依照此格式,文章條理清楚即可 )
遇到的問題: (題意請描述清楚)
請繪出下列程式的流程圖
void sort (int *a, const int n)
// sort the n integers a[0] to a[n-1] into non-decreasing order
{
for (int i=0; i<n; i++)
{
// find the smallest integer from a[i] to a[n-1];
int s=i; // s: the smallest index
for (int k=i+1; k<n; k++)
{
if (a[k]<a[s])
s = k;
}
// interchange
int temp=a[i];
a[i]=a[s];
a[s]=temp;
}
}
補充說明:
一直畫不出正確的流程圖= =
煩了我整個晚上了 誰能幫幫我or教教我
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.243.20.222
※ 編輯: ntustee8 來自: 111.243.20.222 (09/19 23:04)
→
09/19 23:05, , 1F
09/19 23:05, 1F
改了= = 要怎PO
→
09/19 23:06, , 2F
09/19 23:06, 2F
※ 編輯: ntustee8 來自: 111.243.20.222 (09/19 23:18)
※ 編輯: ntustee8 來自: 111.243.20.222 (09/19 23:20)
→
09/19 23:26, , 3F
09/19 23:26, 3F
→
09/19 23:33, , 4F
09/19 23:33, 4F
→
09/20 09:49, , 5F
09/20 09:49, 5F
→
09/20 23:41, , 6F
09/20 23:41, 6F