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


|
運(yùn)行不了啊,提示有11個(gè)錯(cuò)。我用的是fortran90. 下面這些是顯示的錯(cuò)誤: --------------------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ā)表 | |
|---|---|---|---|---|
|
[考研] 083000學(xué)碩274求調(diào)劑 +8 | Li李魚 2026-03-26 | 8/400 |
|
|---|---|---|---|---|
|
[考研] 壓國家一區(qū)線,求導(dǎo)師收留,有恩必謝! +7 | 迷人的哈哈 2026-03-28 | 7/350 |
|
|
[考研] 394求調(diào)劑 +3 | 好事多磨靜候佳?/a> 2026-03-26 | 5/250 |
|
|
[考研] 0856,材料與化工321分求調(diào)劑 +12 | 大饞小子 2026-03-27 | 13/650 |
|
|
[考研] 328求調(diào)劑 +7 | 嗯滴的基本都 2026-03-27 | 7/350 |
|
|
[考研] 291求調(diào)劑 +7 | 孅華 2026-03-22 | 7/350 |
|
|
[考研] 266分求材料化工冶金礦業(yè)等專業(yè)的調(diào)劑 +4 | 哇呼哼呼哼 2026-03-26 | 4/200 |
|
|
[考研] 材料292調(diào)劑 +12 | 橘頌思美人 2026-03-23 | 12/600 |
|
|
[考研] 312求調(diào)劑 +9 | 上岸吧ZJY 2026-03-22 | 13/650 |
|
|
[考研] 調(diào)劑 +3 | 李嘉圖·S·路 2026-03-27 | 3/150 |
|
|
[考研] 一志愿鄭大085600,310分求調(diào)劑 +5 | 李瀟可 2026-03-26 | 5/250 |
|
|
[考研] 調(diào)劑求收留 +7 | 果然有我 2026-03-26 | 7/350 |
|
|
[考研] 一志愿河工大 081700 276求調(diào)劑 +4 | 地球繞著太陽轉(zhuǎn) 2026-03-23 | 4/200 |
|
|
[考研] 生物技術(shù)與工程 +3 | 1294608413 2026-03-25 | 4/200 |
|
|
[考研] 086003食品工程求調(diào)劑 +6 | 淼淼111 2026-03-24 | 6/300 |
|
|
[考研] 318求調(diào)劑 +3 | plum李子 2026-03-23 | 3/150 |
|
|
[考研] 一志愿吉大化學(xué)322求調(diào)劑 +4 | 17501029541 2026-03-23 | 6/300 |
|
|
[考研] 344求調(diào)劑 +3 | desto 2026-03-24 | 3/150 |
|
|
[考研] 一志愿河北工業(yè)大學(xué)0817化工278分求調(diào)劑 +7 | jhybd 2026-03-23 | 12/600 |
|
|
[考研] 求老師收我 +3 | zzh16938784 2026-03-23 | 3/150 |
|