当前位置:网站首页>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;
}
边栏推荐
- MySQL~MySQL给已有的数据表添加自增ID
- The new generation of domestic ORM framework sagacity sqltoy-5.1.25 release
- 数据库函数的用法「建议收藏」
- What is the catalog of SAP commerce cloud
- 函数式接口,方法引用,Lambda实现的List集合排序小工具
- MYSQL索引优化
- JS tile data lookup leaf node
- Redis' optimistic lock and pessimistic lock for solving transaction conflicts
- Width and alignment
- Can I "reverse" a Boolean value- Can I 'invert' a bool?
猜你喜欢

Weekly recruitment | senior DBA annual salary 49+, the more opportunities, the closer success!

LNX efficient search engine, fastdeploy reasoning deployment toolbox, AI frontier paper | showmeai information daily # 07.04

這幾年爆火的智能物聯網(AIoT),到底前景如何?

Penetration test --- database security: detailed explanation of SQL injection into database principle

QT graphical view frame: element movement

What is the catalog of SAP commerce cloud

Functional interface, method reference, list collection sorting gadget implemented by lambda

在芯片高度集成的今天,绝大多数都是CMOS器件

MySQL index optimization

Unity脚本生命周期 Day02
随机推荐
Width accuracy
Unity脚本生命周期 Day02
华为云数据库DDS产品深度赋能
Digital recognition system based on OpenCV
LeetCode 58. Length of the last word
Review of Weibo hot search in 2021 and analysis of hot search in the beginning of the year
[flask] ORM one to many relationship
【读书会第十三期】FFmpeg 查看媒体信息和处理音视频文件的常用方法
MySQL learning notes - data type (2)
LNX efficient search engine, fastdeploy reasoning deployment toolbox, AI frontier paper | showmeai information daily # 07.04
Unity动画Animation Day05
[book club issue 13] packaging format and coding format of audio files
Selenium element interaction
How can floating point numbers be compared with 0?
%S format character
Implementation of web chat room
Stress, anxiety or depression? Correct diagnosis and retreatment
Interface test - knowledge points and common interview questions
Unity script API - component component
Rearrange array