#include"stdio.h"#include"stdlib.h"#include"math.h"
void main(){int jisuan(int x, int y);int N, M;printf("輸入兩個數字:\n");scanf_s("%d %d",&M,&N);
此處沒有呼叫方法,只有輸入函式!!
要表達???
}
這部分沒做宣告,而且演算法我沒看,int jisuan(int x, int y){int Z, C;printf("輸入想進行的運算輸入相應的數字:(加法=1減法=2乘法=3除法=4)\n");scanf_s("%d", &C);if (C == 1)Z = x + y; scanf_s("%d", &Z);if (C == 2)Z = x - y; scanf_s("%d", &Z);if (C == 3)Z = x * y; scanf_s("%d", &Z);if (C == 4 && y == 0)printf("ERROR!");else Z = x / y; scanf_s("%d", &Z);printf("%d %d %d", &x, &y, &Z);return 0;}
#include"stdio.h"#include"stdlib.h"#include"math.h"
12void main(){int jisuan(int x, int y);int N, M;printf("輸入兩個數字:\n");scanf_s("%d %d",&M,&N);
此處沒有呼叫方法,只有輸入函式!!
要表達???
}
這部分沒做宣告,而且演算法我沒看,int jisuan(int x, int y){int Z, C;printf("輸入想進行的運算輸入相應的數字:(加法=1減法=2乘法=3除法=4)\n");scanf_s("%d", &C);if (C == 1)Z = x + y; scanf_s("%d", &Z);if (C == 2)Z = x - y; scanf_s("%d", &Z);if (C == 3)Z = x * y; scanf_s("%d", &Z);if (C == 4 && y == 0)printf("ERROR!");else Z = x / y; scanf_s("%d", &Z);printf("%d %d %d", &x, &y, &Z);return 0;}