Objective
- Understand arithmetic expressions
Preparation
- Read sections 3.1 - 3.2 (pages 85-100) from Starting Out with C++ by Gattis.
- Print and complete Worksheet 5.
Programming
- Create a project named lab05 on the Desktop of the computer and insert a new source code file into the project. Write a program to compute integer values for x, y, and z given integer values a, b, c, and d according to the following equations:
x = b2 - 4ac
a2 + c2
y = --------
d2
z = d3 - 2c2 + 3b - a
Your program should:
- Prompt the user for values a, b, c, and d
- Calculate values for x, y, and z
- Display the values for x, y, and z
- Verify your program works correctly.
- Print the Grade Sheet. Show your program to the instructor.
|