为何运行c++时会停止工作

#include<bits/stdc++.h>
using namespace std;
int main()
{
bool p=true;
int a,b=0,d=0;
cin>>a;
for(int i=0;i<a;i++)
{
if(a%i==0)
{
d=i;
b+=i;
if(d!=b)
{
p=false;
}
}

}
if(p) cout<<"Good!";
else cout<<"Bad!";
return 0;
}
这是代码。

第1个回答  2019-03-24
#include<bits/stdc++.h>改成#include<iostream>本回答被网友采纳
相似回答