| 5 | 1/1 | 返回列表 |
| 查看: 2793 | 回復(fù): 17 | ||
| 當(dāng)前只顯示滿足指定條件的回帖,點擊這里查看本話題的所有回帖 | ||
[求助]
編一個fortran程序
|
||
|
需要一個fortran程序,比較簡單的那種,例如f=((5x+6z)*e^(2i) )/(2x-z),其中z=(3y-1)*(x+2) 要求輸出的結(jié)果是三列數(shù)據(jù),分別對應(yīng)x,y,f .并且每列有20個數(shù)。 這三組數(shù)據(jù)是要導(dǎo)入orgin中進(jìn)行圖像模擬的。 初學(xué)fortran,很多東西還不連貫。 請大師們對上面給的式子編個程序示范一下。 |


|
運行不了啊,提示有11個錯。我用的是fortran90. 下面這些是顯示的錯誤: --------------------Configuration: Textxcx - Win32 Debug-------------------- Compiling Fortran... C:\Users\Administrator\Desktop\Textxcx.for C:\Users\Administrator\Desktop\Textxcx.for(6) : Error: Syntax error, found IDENTIFIER 'X' when expecting one of: ( % . = => input (*,*) x,y -------------------^ C:\Users\Administrator\Desktop\Textxcx.for(10) : Error: Syntax error, found INTEGER_CONSTANT '20' when expecting one of: <END-OF-STATEMENT> ; <IDENTIFIER> do 2 1,20 -------------^ C:\Users\Administrator\Desktop\Textxcx.for(11) : Error: Syntax error, found IDENTIFIER 'Y' when expecting one of: * :: , <END-OF-STATEMENT> ; : ) (/ [ + - . ] /) ** / > // .LT. < ... z=(3y(i)-1)*(x(i)+2) ----------^ C:\Users\Administrator\Desktop\Textxcx.for(12) : Error: Unrecognized token '^' skipped f=((5x+6z)*e^(2i) )/(2x-z) ------------------^ C:\Users\Administrator\Desktop\Textxcx.for(12) : Error: Syntax error, found IDENTIFIER 'X' when expecting one of: * :: , <END-OF-STATEMENT> ; : ) (/ [ + - . ] /) ** / > // .LT. < ... f=((5x+6z)*e^(2i) )/(2x-z) -----------^ C:\Users\Administrator\Desktop\Textxcx.for(3) : Error: A specification statement cannot appear in the executable section. parameter(i=(0,1)) ------^ C:\Users\Administrator\Desktop\Textxcx.for(4) : Error: A specification statement cannot appear in the executable section. complex*16 x,y,z,x(20),y(20) --------^ C:\Users\Administrator\Desktop\Textxcx.for(7) : Error: This name has not been declared as an array. [X] x(i)=x ------^ C:\Users\Administrator\Desktop\Textxcx.for(8) : Error: This name has not been declared as an array. [Y] y(i)=y ------^ C:\Users\Administrator\Desktop\Textxcx.for(10) : Error: An unterminated block exists. do 2 1,20 ^ C:\Users\Administrator\Desktop\Textxcx.for(10) : Error: This label is undefined. [21] do 2 1,20 ---------^ Error executing df.exe. Textxcx.exe - 11 error(s), 0 warning(s) |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 330分求調(diào)劑 +4 | qzenlc 2026-03-29 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 081200-11408-276學(xué)碩求調(diào)劑 +6 | 崔wj 2026-03-26 | 6/300 |
|
|
[考研] 一志愿北京化工大學(xué)材料與化工(085600)296求調(diào)劑 +12 | 稻妻小編 2026-03-26 | 12/600 |
|
|
[碩博家園] 求調(diào)劑 330分 085600材料與化工 +3 | gqhhh 2026-03-22 | 3/150 |
|
|
[考研] 348求調(diào)劑 +3 | 小懶蟲不懶了 2026-03-28 | 3/150 |
|
|
[考研] 材料與化工(0856)304求B區(qū)調(diào)劑 +8 | 邱gl 2026-03-27 | 8/400 |
|
|
[考研] 材料求調(diào)劑一志愿哈工大324 +7 | 閆旭東 2026-03-28 | 9/450 |
|
|
[考研] 308求調(diào)劑 +7 | 墨墨漠 2026-03-27 | 7/350 |
|
|
[考研] 070300化學(xué)求調(diào)劑 +4 | 起個名咋這么難 2026-03-27 | 4/200 |
|
|
[考研] 266求調(diào)劑 +11 | 陽陽哇塞 2026-03-27 | 12/600 |
|
|
[考研] 085600材料與化工調(diào)劑 +10 | A-哆啦Z夢 2026-03-23 | 16/800 |
|
|
[考研] 308求調(diào)劑 +7 | 墨墨漠 2026-03-25 | 7/350 |
|
|
[考研] 333求調(diào)劑 +3 | question挽風(fēng) 2026-03-23 | 3/150 |
|
|
[考研] 349求調(diào)劑 +4 | 李木子啊哈哈 2026-03-25 | 4/200 |
|
|
[考研] 294分080500材料科學(xué)與工程求調(diào)劑 +4 | 柳溪邊 2026-03-26 | 4/200 |
|
|
[考研] 303求調(diào)劑 +6 | 藍(lán)山月 2026-03-25 | 6/300 |
|
|
[考研] 各位老師您好:本人初試372分 +5 | jj涌77 2026-03-25 | 6/300 |
|
|
[考研] 材料調(diào)劑 +3 | iwinso 2026-03-23 | 3/150 |
|
|
[考研] 269求調(diào)劑 +4 | 我想讀研11 2026-03-23 | 4/200 |
|
|
[考研] 070300,一志愿北航320求調(diào)劑 +3 | Jerry0216 2026-03-22 | 5/250 |
|