Giúp mình nhé các bn. Cảm ơn nha

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

Read the following passage and mark the letter A, B, C, or D on your answer sheet to indicate the correct answer to each of the questions. A Mission to Mars Have you ever had a dream of traveling to another planet in our solar system? If you have, there is an actual programme that is happening right now, and it hopes to send people to Mars in 2023. Known as the Mars One Mission, it will send a crew of four people on a one -way mission to colonize Mars. Those chosen people will have to be ready to say good-bye to the earth forever, as there will not be a return trip. For the people chosen, they will have to learn to do many different things. First of all, they will be living the rest of their lives with just a handful of other people, so they all must have personalities that allow them to get along. Second, the living quarters that they will have won’t be very spacious, so they will have to deal with that condition as well. If they feel homesick, they will only be able to communicate with people back on the earth via e-mail, video and audio sent back and forth. However, there won’t be any real-time communication. Even at the speed of light, communication between the earth and Mars takes about 20 minutes. Whether the Mars One Mission will actually happen is the big question that a lot of people are asking. There is an enormous skepticism in the science community, and Wired magazine gave the mission a miserable score of two out of ten on its probability scale. However, for those who dream of going to Mars, at least they can say there is a possibility that it could happen. What will NOT be spacious? A: The magazines B: The spaceship C: The mission D: The living quarters

Bài 1: Nhập vào một xâu kí tự. Hãy kiểm tra xem xâu vừa nhập có biểu diễn một số nguyên dương hay không. Nếu không, hãy tìm cách xóa đi ít nhất các kí tự trong xâu vừa nhập, để xâu sau khi xóa biểu diễn một số nguyên dương. Ví dụ: Nhập chuỗi: 85h4992va937#249 • Chuỗi vừa nhập không biểu diễn một số nguyên dương • Cần bỏ đi ít nhất 4 kí tự để xâu còn lại biểu diễn một số nguyên dương. • Xâu sau khi xóa các kí tự là: 854992937249 Bài 2: Cho hai xâu kí tự S1 và S2 được nhập từ bàn phím. Hãy đếm số lần xuất hiện của xâu S2 trong xâu S1. Ví dụ: Nhập S1 = “Chung toi di lam vi ban, hay o yen trong nha vi chung toi!” • Nếu S2 = ‘ung’ thì số lần xuất hiện của S2 trong xau S1 là 2 • Nếu S2 = ‘hoa’ thì số lần xuất hiện của S2 trong xau S1 là 0 Bài 3: Viết chương trình thực hiện các công việc sau: a. Nhập vào một xâu kí tự (bao gồm cả các kí tự trống) b. Loại bỏ toàn bộ các kí tự thừa trong xâu (kí tự thừa là các kí tự trống ở đầu, cuối xâu, hoặc kí tự trống cạnh một kí tự trống khác về bên trái). c. Đếm và thông báo số từ của xâu đã nhập, trong đó từ là các kí tự liền nhau không chứa kí tự trống. Ví dụ: Nhập vào xâu: “ Hom nay toi khong di lam “ Kết quả: o Xâu sau khi loại bỏ kí tự thừa là “Hom nay toi khong di lam” o Xâu có 6 từ