私信TA
用户名:0x83cfdd3c
访问量:17558
签 名:
与世界过招。
自我简介:
作者: 路之予 发表时间:2020-07-21 18:07:18 浏览:870 | 评论:2
参考代码:
#include<stdio.h> #include<math.h> int main() { int a,b,c; for(int i=100; i<1000; ++i) { a=i/100; b=i%10; c=i/10%10; if(i==pow(a,3)+pow(b,3)+pow(c,3)) printf("%d\n",i); } return 0; }
0.0分
3 人评分
看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:
编程语言转换
万能编程问答
代码解释器
代码纠错
SQL生成与解释
在编译器上说pow为多重定义符运行不了
#include "stdio.h" #include "math.h" int main() { int i=2; while (i < 1000) { if ((pow(i / 100 , 3) + pow(i / 10 % 10, 3) + pow(i % 10, 3)) == i) printf("%d\n", i); i++; } system("pause"); return 0; }