TAILIEUCHUNG - Absolute C++ (4th Edition) part 5

Absolute C++ (4th Edition) part 5. KEY BENEFIT: C++ programming concepts and techniques are presented in a straightforward style using understandable language and code. KEY TOPICS: C++ Basics; Flow of Control; Function Basics; Parameters and Overloading; Arrays; Structures and Classes; Constructors; Operator Overloading, Friends, and References; Strings; Pointers and Dynamic Arrays; Separate Compilation and Namespaces; Streams and File I/O; Recursion; Inheritance; Polymorphism and Virtual Functions; Templates; Linked Data Structures; Exception Handling; Standard Template Library; Patterns and UML. MARKET: Useful for both beginning and intermediate C++ programmers. . | Programming Projects 4i Programming Projects 1. A metric ton is 35 ounces. Write a program that will read the weight of a package of breakfast cereal in ounces and output the weight in metric tons as well as the number of boxes needed to yield one metric ton of cereal. 2. A government research lab has concluded that an artificial sweetener commonly used in diet soda will cause death in laboratory mice. A friend of yours is desperate to lose weight but cannot give up soda. Your friend wants to know how much diet soda it is possible to drink without dying as a result. Write a program to supply the answer. The input to the program is the amount of artificial sweetener needed to kill a mouse the weight of the mouse and the weight of the dieter. To ensure the safety of your friend be sure the program requests the weight at which the dieter will stop dieting rather than the dieter s current weight. Assume that diet soda contains one-tenth of 1 artificial sweetener. Use a variable declaration with the modifier const to give a name to this fraction. You may want to express the percentage as the double value . 3. Workers at a particular company have won a pay increase retroactive for six months. Write a program that takes an employee s previous annual salary as input and outputs the amount of retroactive pay due the employee the new annual salary and the new monthly salary. Use a variable declaration with the modifier const to express the pay increase. 4. Negotiating a consumer loan is not always straightforward. One form of loan is the discount installment loan which works as follows. Suppose a loan has a face value of 1 000 the interest rate is 15 and the duration is 18 months. The interest is computed by multiplying the face value of 1 000 by yielding 150. That figure is then multiplied by the loan period of years to yield 225 as the total interest owed. That amount is immediately deducted from the face value leaving the consumer with only 775. .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.