![]() |
#2
lonmaor2008-03-06 10:07
|
输出100以内质数,源代码如下。。错在哪了?请指教一下。。谢谢。。
#include <iostream.h>
void main()
{ int a=3,b=2,r=1;
while (a<100)
{
while (a>b)
{
r=a%b;
if (r=0) {cout<<a<<endl;}else{b=b+1;}
}
a=a+1;
}
}