module dollar_euro_mod public::convert contains subroutine convert() character(len=1)::choice real::dollar,euro print*,"Choose the currency that you want to convert from?" print*,"If you want to convert dollar to euro, enter d" print*,"If you want to convert euro to dollar, enter e" read*,choice print* if (choice=="d") then print*,"Please enter the dollars:" read*,dollar euro=0.807*dollar print*,dollar," dollar is ",euro," euro" else if (choice=="e") then print*,"Please enter the euros:" read*,euro dollar=1.239*euro print*,euro," euro is ",dollar," dollar" else print*,"Invalid input" stop end if print* end subroutine convert end module dollar_euro_mod