一笑奈何在 发表于 2020-10-25 17:24:34

C语言

/* sun      
*   he   */
#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=%+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",lD);
printf("lD=%ld*\n",lD);
return 0;
}


页: [1]
查看完整版本: C语言