Home > Back-end >  JAVA classic topic
JAVA classic topic

Time:09-26

[program] 1 topic: classical problem: there are a pair of rabbits, every month since 3 months after birth was born a pair of rabbits, baby bunny to 3 months after birth to a pair of rabbits each month, if the rabbit is deathless, ask each month rabbit for total
[program 2] title: determine how many prime Numbers between 101-200, and the output of all prime number, program analysis: method of judging prime: remove, each in a number from 2 to SQRT (a), if can be divisible, suggests that this number is not a prime number, on the other hand is a prime number,
[program 3] title: print out all the "daffodil number", the so-called "narcissi few" refers to a three digits, the digits cubic and equal to the number itself, for example: 153 is a "daffodil number", since 153 the third power of=1 + 5 + 3 the third power of the third power of,
[4] program title: will be a positive integer prime factors, such as: enter 90, print out the 90=2 * 3 * 3 * 5, program analysis: to prime factors of n, should first find a the smallest prime number k, and then press the following steps to complete: (1) if the prime equaling to n, the prime factors in the process is over, can be printed out, (2) if n & lt;> K, but n can be divided exactly by k, should print out the value of k, and n is divided by k, as a new positive integer n, you repeat the first step, (3) if n can't be divided exactly by k, k + 1 is used as the k value, repeat the first step.
[5] program title: using the conditional operator nesting to complete this topic: grades & gt; Classmates expressed in A=90 points, and expressed in B between 60 to 89 points, below 60 points in C said,
[6] program title: enter two positive integers m and n, and the greatest common divisor and least common multiple/* * in the loop, as long as the divisor is not equal to zero, in large Numbers, divided by the number of small, small, large Numbers of a number as the next round of circulation of the remainder as the next round of cycle number of smaller, so the cycle until the number of smaller value is 0, return the larger number, this number is the greatest common divisor and least common multiple of product divided by the greatest common divisor of two Numbers, */
[7] program title: enter a line of characters, respectively, the statistics of English letters, Spaces, the number of Numbers and other characters,
[8] program title: o s=a + aa + aaa + aaaa + aa... A value of a is a number, such as 2 + 22 + 222 + 2222 + 22222 (a total of five digits addition at this time), a few together with the keyboard control,
[9] program title: if just one number is equal to the sum of its factors, this number is called "the number", such as 6=1 + 2 + 3. Programming to find all finished within 1000,
[10] program title: one ball from 100 meters height of free fall, after each fall to the ground bounce back to half its original height; Down again, it's on the 10th floor, a total of how many meters high 10th rebound
[11] program title: there are 1, 2, 3, 4 four Numbers, how many can form each other is not the same without repeating Numbers of three digits are [12] program title: corporate bonuses based on profit commissions, profit (I) is less than or equal to 100000 yuan, the bonus can be 10%; Profit is higher than 100000 yuan, less than 200000 yuan, less than 100000 yuan of 10% commission, of above 100000 yuan, 7.5% cocoa commission; Between 200000 and 400000, more than 200000 yuan, can be cut by 5%; Between 400000 and 600000 is higher than 400000 yuan, can be cut by 3%; Between 600000 and 1 million, more than 600000 yuan, can be cut by 1.5%, higher than 1 million yuan, more than 1 million yuan of 1% commission, should profit from keyboard input of the month, bonuses total
[13] program title: an integer, it plus is a completely square number after 100, and 168 is a completely square number, could you tell me how much is the number/* according to the question cycle should be starting - 100 (integer including positive integer, negative integer, zero), it would be more than a meet the conditions of several - 99, but I see most of the people to solve the problem with the topic of "integer" interpreted as a positive integer, I will go with the flow, */
Dong zhong [14] program title: input, judge this year is the day which day
[15] program title: enter three integers x, y, z, please put the three number from small to large output,
[16] program title: output 9 * 9 formula,
[17] program title: monkeys eat peach problem: the monkey on the first day off several peaches, promptly ate a half, still not addiction, and eat more than a half in the morning and the rest of the peaches to eat, eat again, later every morning to eat half a day before the rest of the one, to the 10th day want to eat in the morning, saw only a peach, how much were picked for the first day,
[18] program title: two table tennis team for the game, each out of three people, a team for a, b, c three, b team for the x, y, z three people, have a lottery game list, someone asked the players the game list, a said he didn't than x, said he didn't c x, z, program, please find out the three team player list, [19] program title: print out the following design (diamond)
*
* * *
* * * * *
* * * * * * *
* * * * *
* * *
*
[20] program title: a score sequence: 2/1, 3/2, 5/3, 8, 5, 13, 8, 13... The sum of the top 20 of the sequence of items,

CodePudding user response:

https://blog.csdn.net/mr_zql/article/details/92264836

CodePudding user response:

refer to the second floor timesong wind xiao xi response:
https://blog.csdn.net/mr_zql/article/details/92264836

Very good , bosses, NB

CodePudding user response:

refer to the second floor timesong wind xiao xi response:
https://blog.csdn.net/mr_zql/article/details/92264836

+ 1
  • Related