Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a FORTRAN program that, given three string strings, the program will repla

ID: 3571384 • Letter: W

Question

Write a FORTRAN program that, given three string strings, the program will replace all occurrences of the 2nd string with the 3rd string in the first string and display the modified string.

Example 1 Input:

This is the input string.

is

was

Will produce the output:

This was the input string.

Example 2 Input:

Now is the time for all good men to come to the aid of somebody.

o

0

Will produce the output:

N0w is the time f0r all g00d men t0 c0me t0 the aid 0f s0meb0dy.

Assume that the input strings may be no longer than 79 characters and are input, in order, one line at a time.

Explanation / Answer

I can give you nice approach of how to solve the problem. Below is the code for a function to replace in all occurrences in string with replacement string :

================================

I hope this will definetly help :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote