#include<iostream>
using namespace std;
int c;
int fun_div();
int fun_div(int a,int b){
if(a%b==0){
c=1;
cout<<"Solution Available :\t"<<c;
} else
{
c=0;
}
return c;
}
int main(){
int c;
int e,d;
cout<<"enter two values : \n";
cin>>e>>d;
cout<<endl;
}
誤差在尋找兩個數字的MOD,而不是編譯程序:在尋找兩個數字的MOD,而不是編譯程序mod功能不工作爲什麼?
你可以縮進代碼嗎? – Danh
而你沒有在'main'陰影'int c;'中調用'fun_div' – Danh
'int c;'全局。這可能會導致未來的悲傷。 – user4581301