大佬帮看看#include<iostream>
using namespace std;
class DIF
{
public:
DIF(int lw, int hi);
int isfiff(int x);
void process();
void show();
private:
int low;
int high;
int x;
int a[100];
int count = 0;
};
DIF::DIF(int lw, int hi)
{
low = lw;
x = lw;
high = hi;
}
int DIF::isfiff(int x)
{
int sum = 0;
int x1 = x;
int temp;
while (x1)
{ temp = x % 10; x1 /= 10; sum += temp * temp * temp * temp; if (sum == x) return 1; else return 0;
} }
void DIF::process()
{
while (x <= high && x >= low)
{ if (isfiff(x) == 1) { DIF::a[count] = x; count++; }
}
cout << "共有" << count << "个" << endl;
}
void DIF::show()
{
for (int i = 0; i < count - 1; i++)
{ cout << a[i] << endl;
}
cout << count << endl;
}
int main()
{
DIF dif(1111, 1200);
dif.process();
dif.show();
cout << 3 << endl;
return 0;
}