Problem in fortran program

  • Fortran
  • Thread starter manugv
  • Start date
  • #1
2
0
hello everyone!
I was do programming in fortran and i wanted to print my answer in the format below. I was not able to do it. I have written a part of my program also.
i.e,
#####
greeting = 'Good Morning!'
do 110 I = 1, 12
write (*,115) (greeting)
115 format (A<I>)
110 continue
end
#####
here i want to use a variable 'I' in the format statement i tried it doing but i failed. so plz if anyone knows to use a variable in format statement tell me.
I use gcc-3.4.6 compiler.

output of the program
G
Go
Goo
Good
Good
Good M
Good Mo
Good Mor
Good Morn
Good Morni
Good Mornin
Good Morning
 
Last edited by a moderator:

Answers and Replies

Related Threads on Problem in fortran program

Replies
3
Views
2K
  • Last Post
Replies
5
Views
2K
Replies
3
Views
2K
Replies
8
Views
4K
Replies
2
Views
1K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
6
Views
5K
  • Last Post
Replies
2
Views
6K
Replies
2
Views
3K
Replies
9
Views
10K
Top