c语言第一课
#include <stdio.h>#include <stdlib.h>
int main()
{
int iA=1234;
double dB=123.456;
short sC=123;
long lD=300000000;
printf("iA=%8d*\n",iA);
printf("iA=%8d*\n",iA);
printf("iA=%-8d*\n",iA);
printf("iA=%+d*\n",iA);
printf("iA=%08d*\n",iA);
printf("iA=%#x*\n",iA);
printf("dB=%.2f*\n",dB);
printf("dB=%.4f*\n",dB);
printf("dB=%10.2f*\n",dB);
printf("dB=%-10.4f*\n",dB);
printf("sC=%hd*\n",sC);
printf("lD=%ld*\n",lD);
return 0;
}
可以可以,坚持学习!
页:
[1]