printf(“The discount amount is %.f %% \n”,discount);
在学习C语言的printf输出的时候,原本以为转义符“\”可以使用,后来发现不行,如果想要输出%,需要使用两个百分号,即%%。
在C语言中怎么用printf函数输出%号
最新推荐文章于 2023-08-28 22:59:43 发布
printf(“The discount amount is %.f %% \n”,discount);
在学习C语言的printf输出的时候,原本以为转义符“\”可以使用,后来发现不行,如果想要输出%,需要使用两个百分号,即%%。