02.05.2014 Views

Patrick Corde & Anne Fouilloux

Patrick Corde & Anne Fouilloux

Patrick Corde & Anne Fouilloux

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Corrigés 239<br />

27 ! On demande un rang de musicien.<br />

28<br />

29 print *,"Entrez le rang d’un musicien :"<br />

30 read( unit=*, &<br />

31 fmt=*, &<br />

32 iostat=ios_stdin ) rang<br />

33 do while ( ios_stdin == 0 )<br />

34 read( unit=2, &<br />

35 rec=rang, &<br />

36 fmt=’(a)’, &<br />

37 iostat=ios_mus ) mus<br />

38 if ( ios_mus /= 0 ) then<br />

39 print *,"Le musicien de rang ", &<br />

40 rang, "n’existe pas"<br />

41 else<br />

42 print ’("musicien de rang",i3," ==> ", a)’, &<br />

43 rang,trim(mus)<br />

44 end if<br />

45 print ’(/,"Entrez le rang d’’un musicien :")’<br />

46 read( unit=*, fmt=*, iostat=ios_stdin ) rang<br />

47 end do<br />

48 close( unit=2 )<br />

49 end program musiciens<br />

INSTITUT DU DÉVELOPPEMENT<br />

ET DES RESSOURCES<br />

EN INFORMATIQUE SCIENTIFIQUE<br />

Cours langage Fortran – 27 janvier 2006<br />

<strong>Patrick</strong> <strong>Corde</strong> et <strong>Anne</strong> <strong>Fouilloux</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!