#include <stdio.h>
int main()
{
int a=10;
printf("%d%%\n",a);
return 0;
}
输出10%
#include <stdio.h>
int main()
{
printf("\\n\n");
getchar();
return 0;
}
输出\n 并且换行
#include <stdio.h>
int main()
{
printf("\"\\ is called \'backslash\'.\"");
getchar();
return 0;
}
输出 "\ is called 'backslash'."
总结想要输出% 只需双倍叠加。