Difference between r1.2 and the current
@@ -107,3 +107,4 @@
* 아 잉여하다 - [장용운]
* 왓더, 아웃풋이 멋지군. 나도 코드 안봤으니, 한번 해볼까 -[김태진]
* 해봐 재밌을거야 - [장용운]
#include <iostream> using std::cout; using std::cin; using std::endl; void draw(char, char); int main(void) { char a, b; cin>>a>>b; draw(a, b); return 0; } void draw(char begin, char end) { for(int i=0; i<= (end-begin); i++) { for(int j=0; j<=i; j++) { cout<<(char)(begin+j); } cout<<endl; } }
심심하군요
실행 결과 ¶
Input:
AZ
AZ
Output:
A
AB
ABC
ABCD
ABCDE
ABCDEF
ABCDEFG
ABCDEFGH
ABCDEFGHI
ABCDEFGHIJ
ABCDEFGHIJK
ABCDEFGHIJKL
ABCDEFGHIJKLM
ABCDEFGHIJKLMN
ABCDEFGHIJKLMNO
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOPQ
ABCDEFGHIJKLMNOPQR
ABCDEFGHIJKLMNOPQRS
ABCDEFGHIJKLMNOPQRST
ABCDEFGHIJKLMNOPQRSTU
ABCDEFGHIJKLMNOPQRSTUV
ABCDEFGHIJKLMNOPQRSTUVW
ABCDEFGHIJKLMNOPQRSTUVWX
ABCDEFGHIJKLMNOPQRSTUVWXY
ABCDEFGHIJKLMNOPQRSTUVWXYZ
A
AB
ABC
ABCD
ABCDE
ABCDEF
ABCDEFG
ABCDEFGH
ABCDEFGHI
ABCDEFGHIJ
ABCDEFGHIJK
ABCDEFGHIJKL
ABCDEFGHIJKLM
ABCDEFGHIJKLMN
ABCDEFGHIJKLMNO
ABCDEFGHIJKLMNOP
ABCDEFGHIJKLMNOPQ
ABCDEFGHIJKLMNOPQR
ABCDEFGHIJKLMNOPQRS
ABCDEFGHIJKLMNOPQRST
ABCDEFGHIJKLMNOPQRSTU
ABCDEFGHIJKLMNOPQRSTUV
ABCDEFGHIJKLMNOPQRSTUVW
ABCDEFGHIJKLMNOPQRSTUVWX
ABCDEFGHIJKLMNOPQRSTUVWXY
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Input:
cq
cq
Output:
c
cd
cde
cdef
cdefg
cdefgh
cdefghi
cdefghij
cdefghijk
cdefghijkl
cdefghijklm
cdefghijklmn
cdefghijklmno
cdefghijklmnop
cdefghijklmnopq
c
cd
cde
cdef
cdefg
cdefgh
cdefghi
cdefghij
cdefghijk
cdefghijkl
cdefghijklm
cdefghijklmn
cdefghijklmno
cdefghijklmnop
cdefghijklmnopq
Input:
39
39
Output:
3
34
345
3456
34567
345678
3456789
3
34
345
3456
34567
345678
3456789
Input:
98
98
Output:
(없음)
(없음)