Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by NTC0394

  1. NTC0394

    modifying the order of the loops

    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...
  2. NTC0394

    c and fortran

    Thank you guy! I am going to search about
  3. NTC0394

    c and fortran

    How to use a fortran subroutine inside a program in c, or a program in c call it? If it is possible, how to do this? Send me an example, please.
  4. NTC0394

    problems about date_and_time

    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...
  5. NTC0394

    convert integers to roman

    The program is working perfectly!! Thank you guys!!
  6. NTC0394

    convert integers to roman

    Hi mikrom! No, the original code is good and the problem was just the WHILE LOOP.
  7. NTC0394

    convert integers to roman

    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!
  8. NTC0394

    convert integers to roman

    Hi mikrom and gullipe! The original code is working fine. What I want is it working without WHILE LOOP and using DO LOOP, for example.
  9. NTC0394

    convert integers to roman

    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...
  10. NTC0394

    convert integers to roman

    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)...
  11. NTC0394

    convert integers to roman

    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...
  12. NTC0394

    convert integers to roman

    I've been studied just a little bit C and Java. I'm studying things like arrays and character in fortran.
  13. NTC0394

    convert integers to roman

    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...
  14. NTC0394

    convert integers to roman

    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...
  15. NTC0394

    convert integers to roman

    I need a program to ask the user a number from 1 to 3999 and convert to roman. I don't know how do this without using WHILE. thank you in advance!

Part and Inventory Search

Back
Top