Answer to Question #5985 in C++ for vlebv

Question #5985
the program will test one or more test cases.the first line of input will be a single integer t,the number of test cases (1<t<100).Next 2t line contain the test cases,each on a pair of lines.the first line of each case contains a single integer N,the number of words in the line to fix (1<N<100).the second line contains N words, seperated by single space,with no leading or trailing spaces,and each word will be at least 1 character and at most 10 character long.Each word will be either Arabic or English, consider that for simplicity all Arabic letter will be replaced with the letter '#'. Arabic word will consist of one to 10 '#' character,and english words will consist of one to 10 lower case letters.Each line contains at most one english word.For a line that contains english word,the program should fix the text by swaping the word before the english word with the word after the english word.The word before the english word will remain in the same order.the word after english word will also remain in the same order.For example,if the line is ''# #### ### abc ##",it will be fixed to be "## abc # #### ###".
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS