0% found this document useful (0 votes)
3 views5 pages

Lab 2

The document is a lab manual for Programming Fundamentals at COMSATS University Islamabad, Lahore Campus, detailing tasks for a Computer Engineering student. It includes four lab tasks: calculating total and obtained marks for three subjects, finding the average of three numbers, calculating velocity from distance and time, and converting centimeters to inches and expressing the result in yards, feet, and inches. Each task requires the student to write and present code along with results.

Uploaded by

sjrsocial05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

Lab 2

The document is a lab manual for Programming Fundamentals at COMSATS University Islamabad, Lahore Campus, detailing tasks for a Computer Engineering student. It includes four lab tasks: calculating total and obtained marks for three subjects, finding the average of three numbers, calculating velocity from distance and time, and converting centimeters to inches and expressing the result in yards, feet, and inches. Each task requires the student to write and present code along with results.

Uploaded by

sjrsocial05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

COMSATS University Islamabad, Lahore Campus

Programming Fundamentals
Lab Manual

Name: SUDAIS JUNAID RAZA


Registration: FA24-BCE-064
Program: Computer Engineering
Semester: 2
Lab Task 1: Write a program which provides total and
obtained marks of a student in 3 subjects (say FCP, Math and
EE). The program then displays the percentage of marks in each
subject and also displays overall percentage.
CODE WRITTEN:

RESULT
Lab Task 2: Write a C++ code which get three numbers from
user and find their average.

CODE WRITTEN:

RESULT
LAB TASK 3: Write a program which get distance
and time from user and calculate the velocity
Code WRITTEN:

RESULT:
Lab Task 4: Write a program that prompts the user to
input a length expressed in centimeters. The program
should then convert the length to inches (to the nearest
inch) and output the length expressed in yards, feet, and
inches, in that order.
CODE WRITTEN:

RESULT:

You might also like