You are on page 1of 9

LAB REPORT

UNIVERSITY OF EDUCATION LAHORE


(Faisalabad Campus)

Subject: Programming Fundamental


Submitted to: Dr. Muhammad Anwar
Submitted By: Muhammad Furqan Asghar
Roll No: bsf23005066
Program: BS Computer Science
Semester: 1st
Section: A
Shift: Morning

1
Lab 1
LAB TASK 1.1#
Installation of “DEV C++”

Procedure:

1) First of all download the setup from internet


2) Click on setup
3) Select language
4) Click “I Agree”
5) Click “Next”
6) Install (installation will be start)
7) Finish

LAB TASK 1.2#


Understanding the program structure of C++ and writing the first program.

2
Procedure:

Output:

3
Lab 2
Understanding of datatypes variables and constants
LAB TASK 2.1#
Determine size of different data types.

Procedure:

Output:

4
LAB TASK 2.2#
Practice of variable and constants.

Procedure:

Output:
For Vowels:

For Consonants:

5
Lab 3
LAB TASK 3.1#
Write a program in which all the arithmetic operators are used.
Procedure:

Output:

6
LAB TASK 3.2#
Write a program in which all the comparison operators are used.
Procedure:

Output:

7
LAB TASK 4.1#
Write a pseudocode to determine a student’s final grade and indicate whether it is passing or failing based
on the 50% marks. The final grade is calculated as the average of four marks.

Pseudocode:
1. Start
2. Input Marks of Subject 1
3. Input Marks of Subject 2
4. Input Marks of Subject 3
5. Calculate Average
S 1+ S 2+ S 3
Average= x=
3
6. If Average x<50
Print Fail
7. If Average x>50
Print Pass
8. End

LAB TASK 4.2#


Write pseudocode that takes input of three random numbers and writes them all in ascending order.

Pseudocode:
1) Start
2) Input 1,2 and 3;
3) If num1<num2<num3;
Print num1,num2,num3
4) If num2<num1<num3;
Print num2,num1,num3
5) If num3<num2<num1;
Print num3,num2,num1
6) If num1<num3<num2;
Print num1, num3,num2

8
7) If num3<num1<num2;
Print num3,num1,num2
8) End

LAB TASK 4.3#


0o,k

You might also like