代码
提交代码
#include <stdio.h>
int main()
{
printf ("Characters: %c \n", 'a');
printf ("Decimals: %d %+ld\n", -1977, 650000L);
printf ("Preceding with blanks: %10d \n", 1977);
printf ("Preceding with zeros: %010d \n", 1977);
printf ("Some different radices: %d %x %o %#x %#o \n", 100, 100, 100, 100, 100);
printf ("floats: %4.2f %+.0e %E \n", 3.1415, 3.1415, 3.1415);
printf ("%s \n", "A string");
return 0;
}
运行结果