Home > Back-end >  The problem solving
The problem solving

Time:09-17

Write a program that will read one line of input from the terminal. The input is supposed to consist of two parts separated by a colon:. As its result, your program should produce a single character As follows:
N No colon on the line.
L The left part (before The colon) is longer than The right.
R The right part (after The colon) is longer than The left.
D The left and right parts have The same length but are marketers.
S on The left and right parts are exactly The same.
Examples:
The Input Output
The Sample Sample N
Left: Right R
Sample: the Sample S
Dog: the Cat D
Rabbit: Dog L
[enter]
The number of strings n
2 to the n + 1 line input needs to analyze respectively the string
[output]

N strings of the judgmentFor example:
[enter]
3
The Sample Sample
Dog: the Cat
Rabbit: Dog
[output]
N
D
L

CodePudding user response:

Big boss again to next task...
  • Related