0

所以我必须用 .f 文件扩展名在 fortran77 中编写这个程序,我不想用选项编译它。我想修复该错误,但由于某种原因,我尝试过的一切仍然给我这个错误。我已经包含了代码和错误终端输出

''' 程序 p1 隐式无整数 :: 选择实数 :: inputValue

       do while(choice /= 0) 
              print *, ' '
              print *, 'Enter a conversion option (1-6 or 0 to exit):'
              print *, '-------------'
              print *, '(1) Pounds to Kilograms'
              print *, '(2) Kilograms to Pounds'
              print *, '(3) Feet to meters'
              print *, '(4) Meters to feet'
              print *, '(5) farenheit to Celsius'
              print *, '(6) Celsius to Fahrenheit'
              print *, '(0) Exit this progrm'
              print *, '-------------'
              READ(*,*) choice
  
              IF (choice == 1) THEN
                  print *, 'Please enter the number (Integer) of Pounds to be converted into Kilograms'
                  READ(*,*) inputValue
                  inputValue  = inputValue / 2.20
                  print *, 'Your value is:', inputValue
               ELSE IF (choice == 2) THEN
                  print *, 'Please enter the number (Integer) of Kilograms to be converted into Pounds'
                  READ(*,*) inputValue
                  inputValue = inputValue * 2.20
                  print *, 'Your value is:', inputValue
               ELSE IF (choice == 3) THEN
                  print *, 'Please enter the number (Integer) of Feet to be converted into Meters'
                  READ(*,*) inputValue
                  inputValue = inputValue / 3.28
                  print *, 'Your value is:', inputValue
               ELSE IF (choice == 4) THEN
                  print *, 'Please enter the number (Integer) of Meters to be converted into Feet'
                  READ(*,*) inputValue
                  inputValue = inputValue * 3.28
                  print *, 'Your value is:', inputValue
               ELSE IF (choice == 5) THEN
                  print *, 'Please enter the number (Integer) of Fahrenheit to be converted into Celsius'
                  READ(*,*) inputValue
                  inputValue = (5.0/9.0) * (inputValue - 32)
                  print *, 'Your value is:', inputValue
               ELSE IF (choice == 6) THEN
                  print *, 'Please enter the number (Integer) of Celsius to be converted into Fahrenheit'
                  READ(*,*) inputValue
                  inputValue = (inputValue * 9.0/5.0) + 32
                  print *, 'Your value is:', inputValue
               ELSE IF (choice == 0) THEN
                  print *, 'EXIT'
          
               END IF 
      ENDDO  
  
    end program p1'''

这是错误输出图像

4

0 回答 0