Hey everyone I had a doubt that whether we can able to print the line and take the user input in the same line in the fortran programming is it possible if yes can anyone please help me out in this and give a sample example of it
write is the statement for output, the * selects standard output (terminal/console), '(a)' is the format descriptor for a single string, advance='no' omits the new line at the end of the output.
Sorry, I don’t understand “restricted to only bits rights”. There is really no difference between:
PRINT *, "Hello"
and WRITE (*,*) "Hello"
They both write to “standard output” and are often considered the same unit number. PRINT is an artifact of the past when there was also a PUNCH statement. It’s just a few characters fewer to write, but omits the I/O control list that lets you do things such as ADVANCE.
write (*, ‘(i2, i1)’ ,advance=“no”) n1, n3
consider the above line if the n1 value is 2 digits, n3 value is 1 digit its geting displayed
but where as n1 value if it exceeds the 2 digits like 3 digits its displaying as ***