C 语言添加两个整数的程序
添加两个数字的程序需要两个数字,对其进行数学求和,并将其提供给另一个变量来存储其总和。
示例代码
#include <stdio.h>
int main(void) {
int a = 545;
int b = 123;
printf("The first number is %d and the second number is %d
", a , b);
int sum = a + b;
printf("The sum of two numbers is %d" , sum);
return 0;
}输出
The first number is 545 and the second number is 123 The sum of two numbers is 668
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 语言编程
C++
C#
MongoDB
MySQL
Javascript
PHP