当前位置:网站首页>C language: implementation of daffodil number function
C language: implementation of daffodil number function
2022-07-04 16:07:00 【Procedural ape ink】
Code :
#include <stdio.h>
int cube(int x);
int main()
{
int a , b , c;
for(a = 1 ; a < 10 ; a++){
for(b = 0 ; b < 10 ; b++){
for(c = 0 ; c < 10 ; c++){
if(cube(a)+cube(b)+cube(c) == a*100+b*10+c){
printf("%d \n",a*100+b*10+c);
}
}
}
}
return 0;
}
int cube(int x)
{
return x*x*x;
}
边栏推荐
猜你喜欢
Force button brush question 01 (reverse linked list + sliding window +lru cache mechanism)
MySQL learning notes - data type (2)
. Net applications consider x64 generation
What is the future of the booming intelligent Internet of things (aiot) in recent years?
Data Lake Governance: advantages, challenges and entry
2022年九大CIO趋势和优先事项
压力、焦虑还是抑郁? 正确诊断再治疗
MySQL learning notes - data type (numeric type)
How was MP3 born?
Understand the context in go language in an article
随机推荐
Socks agent tools earthworm, ssoks
MySQL学习笔记——数据类型(2)
The new generation of domestic ORM framework sagacity sqltoy-5.1.25 release
Recommend 10 excellent mongodb GUI tools
Unity脚本API—Time类
PXE网络
[book club issue 13] ffmpeg common methods for viewing media information and processing audio and video files
Book of night sky 53 "stone soup" of Apache open source community
Hexadecimal form
Qt---error: ‘QObject‘ is an ambiguous base of ‘MyView‘
[book club issue 13] packaging format and coding format of audio files
Unity script introduction day01
In today's highly integrated chips, most of them are CMOS devices
How can floating point numbers be compared with 0?
. Net delay queue
The four most common errors when using pytorch
Redis sentinel mode realizes one master, two slave and three Sentinels
Functional interface, method reference, list collection sorting gadget implemented by lambda
31年前的Beyond演唱会,是如何超清修复的?
LeetCode 35. Search the insertion position - vector traversal (O (logn) and O (n) - binary search)