diff --git a/c04_string/width.c b/c04_string/width.c new file mode 100644 index 0000000..af7be68 --- /dev/null +++ b/c04_string/width.c @@ -0,0 +1,14 @@ +/* width.c - 字段宽度 */ +#include + +#define PAGES 959 + +int main(void) +{ + printf("*%d*\n", PAGES); + printf("*%2d*\n", PAGES); + printf("*%10d*\n", PAGES); + printf("*%-10d*\n", PAGES); + + return 0; +} \ No newline at end of file