标签:return lag main == stream als int out bsp
#include<iostream>
using namespace std;
int main() {
int n,i;
bool flag = true;
for (n = 10;n < 100;n++) {
for (i = 2;i < n / 2;i++) {
if (n%i == 0)
flag = false;
}
if ((n % 10 == n / 10)&&flag==true)
cout << n << endl;
flag = true;
}
for (n = 100;n < 1000;n++) {
for (i = 2;i < n / 2;i++) {
if (n%i == 0)
flag = false;
}
if ((n / 100 == n % 10)&&flag==true)
cout << n << endl;
flag = true;
}
return 0;
}
标签:return lag main == stream als int out bsp
原文地址:http://www.cnblogs.com/isaacgy/p/7214315.html