In the following code I want to generate a random number that have 2 decimal digit after decimal point. for example I want random variable give (0.26) instead of (0.26463). please help me. thanks for all answers. this is my code:
PROGRAM alaki
IMPLICIT NONE
REAL :: RANDOMREAL
CALL RANDOM_SEED()
CALL RANDOM_NUMBER(RANDOMREAL)
PRINT *, "random number= ", RANDOMREAL
END PROGRAM alaki
Aucun commentaire:
Enregistrer un commentaire