Guest User

Untitled

a guest
Sep 14th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. character error fortran 90
  2. program calcul
  3.  
  4. ! ce programme permet d'effectuer des opérations mathématique de base
  5.  
  6. IMPLICIT NONE
  7.  
  8. REAL::x,y
  9.  
  10. character(len=1)::op
  11.  
  12. character(len=16)::op_msg
  13.  
  14. write(*,*)"entrer le type d'opération à effectuer(+,-,/,x,*)"
  15.  
  16. read(*,*)op
  17.  
  18. write(*,*)"entrer le premier nombre de l'opération"
  19.  
  20. read(*,*)x
  21.  
  22. write(*,*)"entrer le deuxième nombre de l'opération"
  23.  
  24. read(*,*)y
  25.  
  26. if(op=="+") then
  27.  
  28. write(*,*)x,"plus",y,"egale",x+y
  29.  
  30. else if(op=="-")then
  31.  
  32. write(*,*)x,"moin",y,"egale",x-y
  33.  
  34. else if ((op==("*").or.("x")) then
  35.  
  36. write(*,*)x,"multiplie par",y,"egale",x*y
  37.  
  38. else if (op=="/")then
  39.  
  40. write(*,*)x,"divise par",y,"egale",x/y
  41.  
  42. else
  43.  
  44. write(*,*)"erreur:operation incorrecte"
  45.  
  46. end if
  47.  
  48. end program calcul
  49.  
  50. calculette.f90:21.26:
  51.  
  52. else if ((op==("*").or.("x")) then
  53.  
  54. 1
  55.  
  56. Error: Invalid character in name at (1)
  57.  
  58. else if ((op==("*").or.op==("x")) then
Add Comment
Please, Sign In to add comment