#include<iostream>using namespace std;int main(){ int a,b=0; //b=0會無限?? cin>>a; cout<<"a的因數 : "<<endl; while(b<=a) { int c=a%b; if(c==0) { cout<<b<<endl; b++; } else b++; } system("pause"); }
b=0會無限??
我懂ㄌ 感謝指導