c++让程序输出1000以内的三位数是素数同时还是对称数
c++让程序输出1000以内的三位数是素数同时还是对称数
日期:2013-11-01 11:17:25 人气:1
判断是不是求余能整除!=应该改为==
判断x==z应该在最里面的循环里
using namespace std;
int main()
{
int x,y,z =0 ;
int a,b,c;
for(a=1;a<=9;a++)
{ for(b=0;b<=9;b++)
{
for(c=1;c<=9;c++)
{
x=100*a+10*b+c;
bool flag = true;
fo