题目内容
执行以下程序,(1)如果输入25/3,则输出结果为。(2)如果输入35+25,则输出结果为。#includeint add(int a,int b);int sub(int a,int b);int mul(int a,int b);int div(int a,int b);int main(){int a,b,s=0;char op;scanf("%d%c%d",&a,&op,&b);switch(op){case '+':printf("%d",add(a,b));case '-':printf("%d",sub(a,b));case '*':printf("%d",mul(a,b));case '/':printf("%d",div(a,b));}return 0;}int add(int a,int b){return a+b;}int sub(int a,int b){return a-b;}int mul(int a,int b){return a*b;}int div(int a,int b){return a/b;}
查看答案
搜索结果不匹配?点我反馈
更多问题