c++基础_特殊的数字

#include <iostream>
#include <math.h>
using namespace std;
int main(){
    for(int i=100;i<1000;i++){
        int a=i%10;
        int aa=(i/10)%10;
        int aaa=(i/100);
        int SanCiFang=pow(a,3)+pow(aa,3)+pow(aaa,3);
        if(SanCiFang==i){
            cout<<i<<endl;
        }
    }
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-25
  • 2021-12-19
  • 2021-11-23
  • 2021-09-04
  • 2021-04-29
猜你喜欢
  • 2022-03-04
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
相关资源
相似解决方案