[ create a new paste ] login | about

Link: http://codepad.org/McrmToxc    [ raw code | output | fork ]

C, pasted on Jun 10:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
int main()
{
	printf("%d %d\n", 100, 200);
	printf("%-5d %d\n", 100, 200);
	printf("%5d %d\n", 100, 200);
	printf("%05d %d\n", 100, 200);

	printf("%s %s\n", "테스트", "연습1");
	printf("%-10s %s\n", "테스트", "연습12");
	printf("%10s %s\n", "테스트", "연습123");
	printf("%010s %s\n", "테스트", "연습1234");

	return 0;
}


Output:
1
2
3
4
5
6
7
8
100 200
100   200
  100 200
00100 200
테스트 연습1
테스트  연습12
 테스트 연습123
 테스트 연습1234


Create a new paste based on this one


Comments: