使用%d转换说明符和printf()语句显示整数数据类型

#include <stdio.h>

int main()
{
    printf(%d, 55); 
    return 0;
}

执行结果为:

55

%d转换说明符还可用于输出声明为整数数据类型的变量的内容。

#include <stdio.h>

int main()
{
    int operand1;  

    operand1 = 29; 

    printf(The value of operand1 is %d, operand1); 
    return 0;
}

相关文章

for遍历数组
。。。
声明一个计数循环
咕咕咕
#include <stdio.h> int main (void) { printf (&quo...