Answer:
see explaination
Explanation:
I made use of python program to solve this.
text file name with fun.txt.
6 fun. 3 hello 10 <> 2 25 4 wow!
Program code:
import re
file = open('fun.txt','r') #for reading file
strings="" #declaring empty string
for k in file:
strings=strings+k #all character in file is storing in strings variable for do operations
pattern = '\s' #for pattern \s is for space
result = re.split(pattern, strings) #split the string with space
for k in range(len(result)): #loop through the list of string
if(k%2) == 0: #checking for integer to time of string
p=int(result[k])
print(result[k+1] *p) #print times of the string(k+1)
Check attachment for output