Giúp tớ với ạ nhập mảng gồm n phần tử. a.Tìm vị trí k (với k được nhập từ bàn phím). b. Nhập giá trị của a[k] chèn vào vị trí k. c. Sắp xếp theo thứ tự tăng dần, giảm dần. d. Chèn giá trị x theo đúng thứ tự đã sắp xếp.

Các câu hỏi liên quan

Ex2. Choose the best answer 1. I didn’t go to school yesterday ___________ I was ill A. but​B. so​C. because​D. although 2. If we ________cutting down the trees, we can’t prevent floods and other natural disasters A. will stop​B. don’t stop​C. stop​D. won’t stop 3. My sister ________ to Hue before. A. didn’t go​B. doesn’t go ​ C. hasn’t gone ​D. isn’t going 4. Our future houses will use __________ energy and they are very friendly to the environment. A. sun ​B. sunny ​ C. solar​ D. lunar 5. Do you think we might ________ with robots in the future? A. live​B. living ​C. lives ​D. to live 6. A hi-tech robot will help us __________ children while we are away. A. look out ​B. look at ​C. look after ​ D. look in 7. _______________ is your favorite program? A. Where​B. Which​C. What​D. Who 8. Which ___________ is Britain in? – Europe. ​A. country​B. continent​C. city​D. area 9. Walking to school will help ……………… air pollution. A. reduce​ ​B. reuse ​C. recycle​D. refill 10. My sister ……………… home for school yet. A. didn’t leave ​B. hasn’t left ​C. don’t leave ​D. isn’t leaving 11. Amsterdam is one of the ……………… cities in the world. A. peacefulest ​B. peacefuler ​C. most peaceful ​D. more peaceful 12. ……………… the film is late, I will wait to watch it. A. Because​B. When​C. But​D. Although 13. My father first ……………… Da Lat in 2010. A. visited​ ​B. went ​C. go​ ​D. been 14. If the weather ……………… good, I ………………. camping with classmates. A. is / will go​ ​B. is / go ​C. will be / go ​D. will be / will go 15. Which one is different?​ A. boxing​ ​B. cycling ​C. telling​D. skiiing 16. Find the word which has a different sound in the part underlined. A. brother​ ​B. these ​C. thought​D. clothes Ex3. Choose the best answer A, B, C or D to complete the sentences: 1. You can watch Harry Potter on TV ________ you can read it. A. so ​B. and ​C. but ​D. or 2. “- ________ a nice T-shirt, Trang!” _ “ Thank you” A. How​ B. What ​C. Which ​D. It 3. “- ________ films have you seen this week ?” _ “ Only one” A. How many B. What ​C. Which​D. Who 4. There aren’t - ________ good films on TV at the moment. A. some ​ B. any​C. much​D. a lot 5. If we cut down more trees, there - ________ more floods. A. are​B. were​C. have been​D. will be 6. That is - ________ book I’ve ever read. A. the borest B. the boring ​C. the most boring ​D. the most bored 7. I’ ve never seen a- ________ bridge than this one. A. longest​B. longer​C. most longest​ D. more longer 8. That dog isn’t _______it looks. A. more dangerous than​B. as dangerous as C. dangerous than​D. dangerouser than 9. In the future, we won’t go on holiday to the beach but we - ______ go on holiday to the moon. A. must ​B. can’t ​C. might ​D. won’t 10. - ________ you swim when you were ten? A. Can ​B. Could ​C. Will ​D. Might 11. My father likes watching TV____________ he doesn’t like listening to music. A. and B. so​ C. but D. because 12. We should use _____________pens and pencils to reduce rubbish. A. reliable​B. reusable​C. refillable​D. sociable 13. In the future, we will have ___________to do housework. A. robots​B. wireless TV​C. smart phone​D, hi-tech fridge 14. Eiffel Tower is the most attractive ____________in France. A. building​B. resor​C. square​D, landmark 15. We should use _________to save natural resources. A. oil​B. solar energy​C. coal​D. gas 16._______________ means creating new products from used materials. A. Reduce​B. Reuse​C. Recycle​D. Rebuild 17 If the ______________ is polluted, we won’t have enough food to eat. A. water​B. air​C. noise​D. soil 18. We should give unused clothes to_____________to help the people in need. A. charity​B. factory​C. market​D. hospital 19. My head hurts. I need to take a ………. A. sun cream​B. backpack​C. walking boots​D. painkiller 20. She is always____________ at school. She spends most of the time studying​ A. hard-working​B. careful​C. lazy​D. funny 21. “I’ve just received a scholarship”- “__________”. A. Well B. Thank you C. Really D. Congratulations 22. A hi-tech robot will help us __________ children while we are away. A. look after B. look in C. look at D. look out 23. I didn’t go to school yesterday ___________ I was ill A. although B. so C. because D. but 24. If we ________cutting down the trees, we can’t prevent floods and other natural disasters A. don’t stop B. stop C. won’t stop D. will stop 25. Do you think we might ________ with robots in the future? A. lives B. to live C. living D. live 26. Our future houses will use _______ energy and they are very friendly to the environment. A. sun B. solar C. lunar D. sunny 27. Pelé’s father was a________ football player A. profession B. professionalism C. professional D. profess 28.The Nile River is the ________ river in the world A. the longest B. longer C. longest D. long