for (int i = m; i <= n; i++) {
a = i % 10;
b = i / 10 % 10;
c = i / 100;
if (i == a * a * a + b * b * b + c * c * c) {
cout << i << end1;
}
else {
cout << "none" << end1;
}
}
你试试for循环里面这样写
输入为啥要while()
return 0;呢
while(cin>>m>>n)是啥意思,直接cin>>m>>n就可以了