Viết chương trình tính tổng các cặp số nguyên được lưu trữ trong tệp input.txt (các số cách nhau bởi dấu cách và được viết trên cùng một dòng). Tính và đưa kết quả ra màn hình. Ví dụ minh họa: Trong tệp input.txt chứa dãy các số nguyên 2 4 7 13 25 6 18 -1 ⇒Tổng các cặp số liên tiếp xuất ra màn hình là 6 20 31 17

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

III/ Replace the relative clause by a particle construction while keeping the rest of the sentence unchanged 1. The boy who was waiting in the hall expected a phone call. --> The boy waiting in the hall expected a phone call. 2. Passengers who wanted to go to Liverpool had to change in Manchester. --> ____________________________________________________________________________. 3. The girl who was picked up by her brother was very nice. --> ____________________________________________________________________________. 4. The house that stands at the end of the road will soon be sold. --> ____________________________________________________________________________. 5. The conference which was planned by non-governmental organizations was about globalization. --> ____________________________________________________________________________. 6. Irish people who live in Great Britain have the right to vote in British elections. --> ____________________________________________________________________________. 7. A friend who helps you in need is a good friend indeed. --> ____________________________________________________________________________. 8. A picture that shows the image of a person is a portrait. --> ____________________________________________________________________________. 9. The problems that were discussed will be essential for your exam. --> ____________________________________________________________________________. 10. Animals that eat plants are called herbivores. -->_____________________________________________________________________________.