Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of Java cycle exercises

2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "Java cycle exercise Analysis". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn the "Java cycle exercise Analysis"!

1. Calculate the number of daffodils

Print out all the "daffodils". The so-called "daffodils" refers to a three-digit number.

The sum of the digital cubes is equal to the number itself.

For example, 153 is a "number of daffodils"

Because 153 times 1 to the third power + 5 to the third power + 3 to the third power.

/ / first question, the number of daffodils public class demo4 {public static void main (String [] args) {System.out.println ("numbers up to 1000"); int upright 0; for (int iTunes 100th I)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report