[問題] 程式的一點小問題

看板Fortran作者 (趙守博下台!!!!!)時間15年前 (2008/11/25 00:42), 編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
program hw1 implicit none integer a,b,c,d,total a=5 b=10 c=3 d=6 total=a*b-c*d print*, total stop end program 我這種寫法 最後結果是只有跑出total的值 有沒有哪種寫法 可以順便列出前面的算式 就是印出 5*10-3*6=32 或者是這段程式有沒有其他的寫法 還請大家多指教 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.170.193.163

11/25 01:28, , 1F
print *,a,'*',b,'-',c,'*',d,'=',total
11/25 01:28, 1F

11/25 01:42, , 2F
感謝
11/25 01:42, 2F
文章代碼(AID): #19AjbOh4 (Fortran)