特魯克語翻譯我想哄騙C說話先設一個陣列 然後畫一個原點為(h翻譯社k) 半徑為r的圓 而這圓上面的點為0 其餘為1 .......仿佛表達的不是很清晰 抱愧! 像如許 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 如許比較清楚 圓周上的點為0 其餘為1 #include <stdio.h> #define ROW 24 #define COL 32 #include <math.h> int a[ROW][COL]; void circle(int h,int k,int r){ int x翻譯社y; for(x=h-r;x<=h+r;x++){ y = (float)(sqrt(pow(r,2)-pow(x-h,2)))+k; a[ROW-1-y][x]=0; y = -(float)(sqrt(pow(r,2)-pow(x-h,2)))+k; a[y][x]=0; } } int main(void) { int x翻譯社 y ; for(y=0;y<ROW;y++) for(x=0;x<COL;x++) a[y][x]=1 ; circle(10翻譯社10,8); for(y=0;y<ROW;y++){ for(x=0;x<COL;x++) printf("%d ",a[y][x]); printf("; "); } return 0; } 可以請列位幫我看看哪邊的值設錯了嗎? 今朝跑出來的結果差許多 請各位指教 謝謝!!

文章出自: https://www.ptt.cc/bbs/C_and_CPP/M.1273128997.A.846.html有關各國語文翻譯公證的問題歡迎諮詢華頓翻譯公司02-77260932

arrow
arrow
    文章標籤
    翻譯社
    全站熱搜
    創作者介紹
    創作者 webbtng7q04j3 的頭像
    webbtng7q04j3

    這裡是和華碩翻譯有關的地盤,歡迎到訪我的BLOG!

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