Get the App
SLTechnology News&Howtos  ›  Development  › 

Analysis of Java cycle exercises

Shulou Source: shulou.com Published: 2022-06-01 13:34:19 10月02日 Update

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)

Tags: Loops numbers daffodils daffodils input maximum minimum maximum exercises analysis number of digits content integers finding learning different practical deeper same Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Linux macOS MariaDB Shulou Information