Question: both the subroutine and the main program are required Problem 2: Write a FORTRAN 90 stubroutine named cc that takes as its first argument a

 both the subroutine and the main program are required Problem 2:

both the subroutine and the main program are required

Problem 2: Write a FORTRAN 90 stubroutine named cc that takes as its first argument a two dimensional array of characters named arr with NR rows and NC columns where NR and NC are parameters The second argument to the subroutine is a character string of length 1 named ch. The subroutine source code is in a module in a separate file from the file containing the main program source code. For each row the subroutine prints (on a single line) at the screen the characters in the row up to but not including the first occurrence of the character in ch. If the character in ch does not occur in a row, then all characters in the row are printed on a single line on the screen. Write a main program that uses the subroutine cc. Provide test results for the following data file which the main program opens and reads. (Use values of 5 and 6 for NR and NC respectively 231x56 s3fgtr wxr56t 12x3xx xf3f3e Provide a run with user input character "3" and another run when the input character "1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!