Bonjour,
j ai a programé la fonction suivante:
f(x)=2 si -03<x<0.3
f(x)=1si -0.7<x<-0.3 et 0.3<x<0.7
et f(x)=1 ailleurs
j ai écrit mon code mais j arrive pas a trouver l erreur, pouvez vous m aider svp?
merci
voila mon code
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 program dd integer i print*,'g(0.9)=',gamma(0.9d0) end function gamma(x) double precision x if((x.le.0.3).and.(-0.3.le.x)) then gamma=2. elseif((x.ge.0.7).and.(-0.7.ge.x)) then gamma=1. else gamma=0.5 endif return end