Professional Documents
Culture Documents
تتوريل برمجة3
تتوريل برمجة3
Tutorial 3
1. Write a C++ program that asks for a temperature in Fahrenheit and
displays it in Celsius. Use the formula:
5
𝐶 0 = (𝐹 − 32)
9
5. For each the following algebraic expressions write an equivalent C++ arithmetic
expression.
𝑎3 − 𝑏 2
𝐚)
𝑐 2 + 25
1 1 1 1
𝐛) + 2 + 3 + 4
𝑥 𝑥 𝑥 𝑥
𝑡
𝐜) 𝑥 + 𝑦 2 +
𝑧
6. Determine the values of the variables for each of the following C++ statements:
a) z = x++*y;
b) z = 2*++x*y;
c) x += 4+--y/x---3;
d) y %= x;
Assume that x=4 , y=6. Assume that all variables are integers.