看板 Fortran 關於我們 聯絡資訊
! CF0610.f90 ! ! FUNCTIONS: ! CF0610 - Entry point of console application. ! ! Example of displaying 'Hello World' at execution time. ! !**************************************************************************** ! ! PROGRAM: CF0610 ! ! PURPOSE: Entry point for 'Hello World' sample console application. ! !**************************************************************************** program CF0610 implicit none integer a, b, c a= 5 b= 6 c= a*b print *, 'Hello World', c end program CF0610 ! 如果 a= 50000, b= 60000, c= a*b ! 會得到 錯誤的答案 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.231.132.82
sjgau:因為 integer, default 是 4- 個 bytes, 最大只能到 09/08 06:24
sjgau:-2147483648 ... +2147483647 09/08 06:24