首页 > 其他分享 >输出运算结果

输出运算结果

时间:2022-10-31 19:44:45浏览次数:30  
标签:24 输出 运算 结果 int 34 printf main

一、做计算

 

    printf("%d\n", 34+24);

%d说明后边需要有一个整数在输出位置上

    printf("34+24=%d\n", 34+24);

 

二、完整代码

#include<stdio.h>

int main()
{
    printf("%d\n", 34+24);
    return 0;
 } 

 

输出结果

 

 

 

 

 

#include<stdio.h>

int main()
{
    printf("34+24=%d\n", 34+24);
    return 0;
 } 

 

输出结果

 

 

 

三、四则运算

 

 

 

 

 %表示两个数相除之后取余数

标签:24,输出,运算,结果,int,34,printf,main
From: https://www.cnblogs.com/PINK001128/p/16845516.html

相关文章