C语言怎么输出百分号%
生活随笔
收集整理的這篇文章主要介紹了
C语言怎么输出百分号%
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
規律:printf函數中,當出現多個%時,由左至右,每兩個%結合輸出一個%
#include <stdio.h> #include <stdlib.h> #include <math.h> int main() {int c = 52;printf("% \n %% \n %%% \n %%%% \n %%%%% \n %%%%%%\n");printf("%d %%d %%%d %%%%d %%%%%d %%%%%%d\n",c,c,c,c,c,c);return 0; }結果
%%%%%%%%% 52 %d %52 %%d %%52 %%%d總結
以上是生活随笔為你收集整理的C语言怎么输出百分号%的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 想买设备在农村家乡巡回放影片,有市场吗?
- 下一篇: 地下城与勇士求剑圣加点