aboutsummaryrefslogtreecommitdiff
path: root/0-0-inter/subject.ko.txt
blob: e8e99616924abfd3511a8a448cc3ee3f21415a2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Assignment name  : inter
Expected files   : inter.c
Allowed functions: write
--------------------------------------------------------------------------------

Write a program that takes two strings and displays, without doubles, the
characters that appear in both strings, in the order they appear in the first
one.
두 문자열을 인자로 받아, 해당 두 문자열에 둘 다 나타나는 문자들을 화면에 중복 없이 출력하는 프로그램을 작성하시오. 이 때, 첫 번째 문자열에서 나타나는 순서대로 문자들을 출력합니다.

The display will be followed by a \n.
출력의 마지막에는 \n 이 따라와야 합니다.

If the number of arguments is not 2, the program displays \n.
만약 인자가 2개가 아닐 경우 \n 을 출력합니다.

Examples:

$>./inter "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e
padinto$
$>./inter ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e
df6ewg4$
$>./inter "nothing" "This sentence hides nothing" | cat -e
nothig$
$>./inter | cat -e
$