Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program String_Triming
- Implicit none
- Open(15, File = 'Output.txt')
- Write(15,'(A,1x,"j",1x,A)') Ispis(20.45),Ispis(20.45)
- Write(15,'(A,1x,"j",1x,A)') Ispis(-20.45),Ispis(-20.45)
- Close(15)
- Contains
- Function Ispis ( Deg ) result ( Str )
- Real,intent(in)::Deg
- Character(len=16):: Str
- If ( Deg > 0 ) then
- Write(Str,'(F0.3)') 1000.0 + Deg
- Str = Str(2:)
- Else
- Write(Str,'(F8.3)') 1000.0 + abs(Deg)
- Write(Str,'("-",A)') Str(3:)
- End If
- End Function Ispis
- End program String_Triming
- 020.450 j 020.450
- -20.450 j -20.450
- 020.450 j 020.450
- -20.450 j -20.450
Add Comment
Please, Sign In to add comment