COMPUTER SYSTEMS AND PROGRAMMING
LAB REPORT-3
Prepared and submitted by
Ali Hassan-546213
JANUARY 31, 2026
Explanation of lab tasks:
Following is the explanation of each lab task with screenshots attached:
1.
The program takes a number from the user as input or x from which the value of the polynomial
y=5x +6x2+12 is calculated and is displayed on the console.
3
2.
The program takes a radius as input from the user and stores it in a float variable. It then uses the constant
value of pi that has been initialized to calculate the circle's diameter, circumference, and area which are displayed on
the console.
3.
The program takes weight and height from the user as input and stores them in float variables. It then
𝐰𝐞𝐢𝐠𝐡𝐭 𝟐
calculates the BMI by using the formula BMI = 𝐡𝐞𝐢𝐠𝐡𝐭 and displays it on the console.
4.
The program takes the temperature in Celsius from the user as input and stores it in float double variable. It
then converts the temperature in Celsius to temperature in Fahrenheit and displays it on the console.
5.
The program takes the force in newtons from the user as input and stores it in the float variable. It then
converts the force in newtons to kilogram-force and displays it on the console.