21 lines
460 B
C
21 lines
460 B
C
#include <stdio.h>
|
|
|
|
int main(){
|
|
printf("[%d]\n", 123);
|
|
printf("[%10d]\n", 123);
|
|
printf("[%010d]\n", 123);
|
|
printf("[%-10d]\n", 123);
|
|
printf("[%d]\n", -123);
|
|
printf("[% d]\n", 123);
|
|
printf("[%#xd]\n", 0x12);
|
|
|
|
printf("[%10s]\n", "ab");
|
|
printf("[%-10s]\n", "ab");
|
|
|
|
printf("[%f]\n", 1.23456789);
|
|
printf("[%.3f]\n", 1.23456789);
|
|
printf("[%10.3f]\n", 1.23456789);
|
|
printf("[%-10.3f]\n", 1.23456789);
|
|
|
|
return 0;
|
|
} |