The document outlines 4 exercises for a C++ lab. Exercise 1 has the student write a program to display the sum and product of two input numbers. Exercise 2 is to write a program that converts a distance in meters to kilometers, yards, and miles. Exercise 3 is to write a program to calculate the carpet cost for a room given its dimensions in meters and the price per square meter. Exercise 4 is to write a program to calculate and print the number of minutes in a year.
2. Exercise 1
• Write a C++ program to display the sum
and product of two input numbers.
3. Exercise 2
• Write a C++ program to enter a distance in
meters and print out its value in kilometers,
yards, and miles.
(Note: 1 m = 0.001 km = 1.094 yd = 0.0006215 mi).
4. Exercise 3
• Write a program to compute the cost for
carpeting a room. Input should consist of the
room length (in meters), room width (in
meters), and carpet price per square meter.