You are on page 1of 1

SENG101 Intro to Software Programming

Lab Assignment I
Prepared by Ms. Meltem Şirin

OVERVIEW & PURPOSE

To be familiar with different data types, Operators and Expressions in C.

ACTIVITIES
1. Write a program to convert Fahrenheit to Celcius

Apply formula to convert

celsius = (fahrenheit - 32)*5/9;

2. Write a program that calculates the squares and cubes of the numbers from 0 to 10 and uses tabs to
print the following table of values

3. Write a program that inputs three different integers from the keyboard, then prints the sum, the
average, the product. The screen dialogue should appear as follows:

Input three different integers: 13 27 14

Sum is 54

Average is 18

Product is 4914

• Write comment to make your programs readable.


• Use descriptive variables in your programs (Name of the variables should show their
purposes)

Ensure that your full name with the number of the lab is on the
assignment.

You might also like