1. What is a double cycle ？ Use in inner loop continue and break sentence , How the program jumps ？

answer ： The double cycle is that one cycle structure contains another complete cycle structure .

continue When a statement jumps, it skips the remaining statements in the inner loop and enters the next loop of the inner loop , That is to jump out of this cycle , Enter next cycle .

break Statement is to jump out of the loop , That is, to end the cycle of this layer ahead of time , Execute the following statement of the loop .

2. Write a program to print the following pattern , The number of lines of the pattern is required to be input by the user .

3." A hundred money and a hundred chickens " The problem of , The question is ：5 Wen qian can buy a rooster ,3 Wen qian can buy a hen ,1 Wen qian can buy 3 A chicken . Now use 100 Buy... With money 100 chicken , So cock , hen , How many chickens are there ？ Programming to realize .

4. There are three classes with four students in each , Enter the scores of each class from the console , It is required to count the scores of all participants in three classes that are higher than 85 The average score of the student who scored , How to program ？

5. Suppose it's in a ATM The process of withdrawing money on board , First, enter the password （password）, You can only type three times at most , More than three times, the user will be prompted “ Wrong password , Please withdraw the card ”, Close the deal . If the input is correct , When the user is prompted to enter the amount （amount）,ATM Output only 100 Yuan notes , The minimum requirement for a single withdrawal is 0 element , The highest 1000 element . If the amount entered by the user meets the above requirements , Then print out the amount of money the user withdraws , Last “ Prompt the user to complete the transaction , Please pick up the card !”

Otherwise, the user will be prompted to re-enter the amount .

6. Enter the number of lines , Print diamond , Requirements are as follows ：

Enter the height of the diamond from the console ( Row number ). If the number of rows entered by the user is legal （ Odd number ）, Then print out the diamond ; Otherwise, the user will be prompted to enter an odd number .

Suppose the number of rows entered by the user is rows, Then each line of characters * The order of the numbers is 1.、3、5、7、......、rows、7.、5、3、1,.

## java Basics Chapter 8 more related articles on after class exercises

1. java Basics （ Eight chapters ）

One .        What is an array and what it does ? Definition : A collection with the same data type effect : Store continuous data of the same type Two .        java How to declare and define arrays in l  The syntax of declaration and definition : data type [ ...

2. insane java The notes Chapter 8 after class questions

1. Create a Set aggregate , And use Set Collection holds strings entered by the user through the console . import java.util.HashSet; import java.util.Scanner; public class ...

3. java Basics IO Flow synthesis plus exercises

IO Stream beginners are a little confused in their study , Today we will talk about IO flow , I hope the explanation can help you IO Streams are divided into byte streams , Character stream , Buffer flow . We just need to remember these three . 1* The byte stream has : Byte input stream (FileInputStrea ...

4. 20145329 《JAVA Programming 》 After class exercise code writing summary

20145329<Java Programming > After class exercise learning summary Summary of learning content package cc.openhome; public class Hello2 { public static voi ...

5. Java Realization Blue Bridge Cup VIP Algorithm improvement 3-1 After-school exercises 2

Algorithm improvement 3-1 After-school exercises 2 The time limit :1.0s Memory limit :256.0MB Problem description Write a program , Accept user input 10 It's an integer , Output their sum . Output format A format that requires the user's output to meet . example : Output 1 That's ok , Contains a ...

6. About 《Java Reading notes 》 The sixth chapter is the summary and questions of multiple choice exercises after class

After-school exercises choice question 3 topic Code : class Some{ String ToString(){ return "Some instance"; } } public class M ...

7. [ turn ] Yes java How do basic people switch to big data ？

Data has two directions , One is computer biased , The other is partial economy . You learned Java, So you can put the computer foundation 1. read <Introduction to Data Mining>, This book is very easy to understand , No complexity ...

8. A little cold rain Java Basic learning notes （ One ）

Use Java Understand program logic It's a walk It's safe for ships to dock in the harbor , But this is not the purpose of shipbuilding It's produced by former teacher Yuming of Qingniao Wudaokou, Peking University 1. Learning methods : 01. Find a good book The initial stage is not suitable for , It can be put into the second stage , When you see knowledge , want ...

9. Java Basic common English vocabulary

Java Basic common English vocabulary ( common 70 individual ) ['ɔbdʒekt] ['ɔ:rientid] Oriented                              ['prəʊɡræmɪŋ] Programming OO: object ...

## Random recommendation

1. Css3 The frame and background of new feature summary ( Two )

One . Striped background utilize background by linear-gradient Function implementation ,linear-gradient The values are as follows : <angle>: angle , The direction of the gradient to left right to ...

2. OSG Timers and timestamps

static osg::Timer* sendMsgTimer = new osg::Timer; if (sendMsgTimer->time_m()>100)//100ms {// d ...

3. x01.Weiqi.9: Click function

Add point function , Although not in the middle , It's not far . Let's take a look at the screenshot first . Make sure it works , Look at another one : The results are as follows , It's more satisfying . This is mainly due to multiple scans , Such as the lexical analysis stage of compiler , The following code proves : private void ...

4. Simply jump to wechat sharing , be based on libWeiChatSDK And simple customization UIActivityViewController

One . Customize UIActivity: If you want to customize UIActivity You must know UIActivityViewController. First of all, this class is mainly used to accept strings ,RUL Type and image type data are used to share and manipulate ...

5. External call JS The solution to the Chinese garbled file

If the encoding format of the test page is :gb2312, And call the external JS There's a garbled file ( Premise is JS There are no errors in the file ), Then the external JS Open the document in Notepad , And then save it in the encoding format of UTF-8 Of JS File can . If you test the encoding format of a web page ...

6. [LeetCode] Answer key ：005-Longest Palindromic Substring Optimize

Analysis of the source and meaning of the title : See my blog for details :http://www.cnblogs.com/chruny/p/4791078.html Topic ideas : The time complexity of solving this problem in my last blog is that the worst case is (O(n^ ...

7. Max Flow

Max Flow Title Description Farmer John has installed a new system of N−1 pipes to transport milk between the N st ...

8. Web edition PowerDesigner (Canvas) technology

What is? Canvas?    HTML5 Of canvas Element usage JavaScript Drawing images on Web pages . The canvas is a rectangular area , You can control every pixel . canvas There are multiple draw paths . rectangular . circular . ...

9. Open source digital media asset management system ：Razuna

Razuna With a use of Java Open source digital media asset management written in (Digital Asset Management) System . It's very powerful , It can be used to manage various formats of digital media resources . Razuna The installation configuration on this machine is also ...

10. React list

const numbers = [1, 2, 3, 4, 5]; const listItems = numbers.map((numbers) => <li>{numbers}&l ...