C magic square~ 點寫好

2007-04-17 6:47 am
我仲未構思好~有冇咩好橋呀??
最好記教教我第一步since 第一步係最難
更新1:

programe 係: user enter row = eg.3, column = eg.3 then the screen should show a magic square that' area is 3*3 the user only can input the odd number between 3 and 11

回答 (1)

2007-04-17 12:21 pm
✔ 最佳答案
第一步梗係寫個grid 既 memory allocation同deallocation先啦,同埋你又可以寫埋d橫直斜既summing functions先

我唔知你係點input個grid size,係咪call個exec果時就get個parameter做grid size定係個exec run緊既時候call put?呢d你可以諗下既

你又冇講清楚你個program要做乜既,我唔知你個c program既目的係乜喎,係咪你打個grid size俾佢,佢就自動做一個magic square俾你?定係好似遊戲咁,你個program出一個magic square,要人填空格?

2007-04-19 05:57:18 補充:
咁咪直接get input,再check下係咪3到11既單數,然後再乘埋佢


收錄日期: 2021-04-25 19:53:50
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070416000051KK05270

檢視 Wayback Machine 備份