width.c
This commit is contained in:
parent
8e1ee26b64
commit
11e99475eb
14
c04_string/width.c
Normal file
14
c04_string/width.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/* width.c - 字段宽度 */
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define PAGES 959
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
printf("*%d*\n", PAGES);
|
||||||
|
printf("*%2d*\n", PAGES);
|
||||||
|
printf("*%10d*\n", PAGES);
|
||||||
|
printf("*%-10d*\n", PAGES);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user