Write a program that adds two numbers using the three functions
• Function 1 : int main(void)
• Function 2 : int Input(void)
• Function 3 : int Add(int i, int j)
Ex)(例子)
Input two numbers : 3 4 Results : 7
c语言初级编程 求解答
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
3条回答 默认 最新
- threenewbee 2015-10-04 16:22关注
图和文字不相符
以你的文字为准:
#include <stdio.h> int Input(void); int Add(int i, int j); int a = 0, b = 0; int main(void) { Input(); int r = Add(a, b); printf("Results : %d", r); return 0; } int Input(void) { printf("Input two numbers : "); scanf("%d %d", &a, &b); } int Add(int i, int j) { return i + j; }
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报