using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; namespace 水仙花数
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
int a = 0, b = 0, c = 0;
for (int i = 100; i < 1000; i++)
{
a = i / 100;
Math.DivRem(i, 100, out b);
b = b / 10;
Math.DivRem(i, 10, out c);
a = a * a * a;
b = b * b * b;
c = c * c * c;
if ((a + b + c) == i)
listBox1.Items.Add(i.ToString());
}
} private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

最新文章

  1. 避免重复造轮子的UI自动化测试框架开发
  2. bzoj 3224 splay模板题4
  3. Centos7 配置网络步奏详解
  4. MySQL做练习时总结的一些知识点
  5. JSON.parse()和JSON.stringify() 的用法区别
  6. HtmlparseUtil.java
  7. Nginx - HTTP Configuration, Module Variables
  8. Java之final的解析
  9. [Leetcode][Python]25: Reverse Nodes in k-Group
  10. Docker镜像与容器命令(转)
  11. json、xml和java对象之间的转化
  12. yii2.0中添加二维数组,多条数据。
  13. python3的一些改动常用到的
  14. 在Linux系统安装Nodejs 最简单步骤
  15. (转)CentOS7中防火墙的基本操作
  16. 【原创】ACR傻瓜式破解IC芯片卡
  17. 深度解析SpringMvc实现原理手写SpringMvc框架
  18. 【转】Python中的字符串与字符编码
  19. PAT 1033 旧键盘打字(20)(20 分)
  20. JavaScript筛选出数组种连续的数字

热门文章

  1. redis加入到Windows系统服务
  2. 设置JPA的Query返回Map对象
  3. wchar_t类型的几个函数
  4. 使用clamav查杀病毒
  5. Ubunntu kylin下安装VmWare Tools(简洁方法)
  6. Codeforces 839 B. Game of the Rows-贪心
  7. springboot引入thymeleaf
  8. 分层图【p2939】[USACO09FEB]改造路Revamping Trails
  9. Bfs【p2385】 青铜莲花池
  10. Trapping Rain Water (Bar Height) -- LeetCode