You are on page 1of 1

Exercises:

Declare variables (using the appropriate data type) and assign values to these variables for the following problems.
You can use any constant value for initialization purposes.

1. Declare vowels as a character variable.


2. The area of a triangle is computed as ½ of the product of its base and height.
3. Compute the product of odd numbers between 1 and 10.
4. The relation between 0.05 and 0.5
5. Conversion of 24°C to Kelvin
6. The overtime pay of an employee is computed as overtime rate multiplied by the number of overtime hours.
7. The force of a free falling object.

You might also like