Hi guys! I am trying to modify my code but it do not works.
I am trying to put "DO j= 1, 1000" first that "DO i= 1, 20". How to do and keep the same results?
DO i = 1, 20
m = 0
m_2 = 0
p = 10*i
DO j = 1, 1000
d = 0
c = 0
DO...
I am trying use date_and_time to calculate how old someone are but I am having some problems about how
change characters to integers. Please, help me!!
Thank you in advance
PROGRAM how_old
IMPLICIT none
INTEGER, PARAMETER :: m_year = 12
INTEGER :: m_born, year_born , day_born, how_old...
Thank you @milrom!
The second code you've sugested works! Great!
I have just a simple problem now: on the output shows something like this:
Enter Arabic numeral:
2
IIL�
how solve this problem: " L�", or better take out it?
thank you for help!
The complete program is the following. I don't know what is wrong.
@mikrom thank you for your attention!
!***********************************************************************************************************************************
! AR2ROM
!
! This function converts an Arabic numeral...
Thank you mikrom
Now I can just do this without WHILE (finally), but I can't do the LOOP using DO. I tried thousand of times using codes like the below and it doesn't work.
Now, the question is: how create a DO LOOP for thid program?
IF (LEFT .GE. 1)
DO ARB = 1, LEFT
LEFT = (LEFT - 1)
ROM(J:J)...
Using the tips of @mikrom
************************************************************************
It's simple. Replace all loops of the form
CODE
do while (condition)
...
end do
with loops like this
CODE
do
...
if (.not. (condition)) then
! exit the loop
exit
end if
end...
As a beginning at fortran I tryed a 100 times and I couldn't modify without compilation problem. :'(. It isn't my own program so I don't understand what some things like this below means.
Why J = J+1? for example
DO WHILE (LEFT .GE. 1000)
LEFT = LEFT - 1000
ROM(J:J) = 'M'
J = J + 1
END DO...
My friend write this one, but I want this program without the function WHILE.
OBS: This program works but after priting results it shows some characters strangers. I don't know why it happens...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.