Loop control statement practice questions


example:

1. Shopping
Go to Taobao to buy goods,
each store has five kinds of goods to buy (clothes 500 yuan, pants 400 yuan, shoes 350 yuan, hat 150 yuan, socks 50 yuan),
every time you finish shopping or do not buy, you will be prompted Whether the user continues to visit the next store, purchase
If not, then proceed to the shopping cart settlement amount.

2. The shell calculator implements addition, subtraction, multiplication, division and remainder

 

3. Print out all files in a directory

 

 

 

4. Use the for loop to merge the contents of multiple text files into one file

 

5. Use three ways to write the sum of 1-100

Guess you like

Origin blog.csdn.net/Sp_Tizzy/article/details/130950781