Question: 2 . Prepare a program that can read a line of input from a terminal. The input can consist of two parts separated by :
Prepare a program that can read a line of input from a terminal. The input can consist of two parts separated by : The left part LP and the right part RP If the size of the LP is greater than the size of the RP then the result will be L otherwise will be R If they have the same size but are different then the answer will be D If the LP and RP are exactly the same then the answer will be S In case that there is no colon on the line then the answer will be Npdequecpp
Peter: pan count the letter peter pan
Hint: aprepare the queue class with the operations
bprepare the extended queue class with the operations
cin the main using the extended queue will provide the message to insert line with the colon
dfrom the colon define the left and the right part of the input line
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
