0% found this document useful (0 votes)
15 views2 pages

Important Programs For Practical 2024

The document outlines important practical programming exercises for the Computer Science Department at Punjab College Lahore for the year 2024. It includes tasks such as determining if a number is even or odd, calculating areas and volumes, and performing arithmetic operations. The list serves as a guide for students to enhance their programming skills through various coding challenges.

Uploaded by

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

Important Programs For Practical 2024

The document outlines important practical programming exercises for the Computer Science Department at Punjab College Lahore for the year 2024. It includes tasks such as determining if a number is even or odd, calculating areas and volumes, and performing arithmetic operations. The list serves as a guide for students to enhance their programming skills through various coding challenges.

Uploaded by

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

PUNJAB COLLEGE LAHORE

Important Programs for Practical (2024)


COMPUTER SCIENCE DEPARTMENT

1) Get a number from user and print whether it is even or odd.


2) Write a program that prints table of a given number.
3) Write a program that calculates area of a rectangular box.
4) Write a program that swap the values of two variables.
5) Calculate total marks, percentage and grade of a student by
obtaining his marks in different subjects.
6) Write a program that prints first 10 odd numbers.
7) Write a program that prints largest of three numbers.
8) Write a program that calculates area of triangle.
9) Write a program that prints sum of odd numbers in a given range.
10) Write a program that calculates factorial of the entered number.
11) Get a character from user and print whether it is vowel or
consonant.
12) Write a program that print multiples of 5 up to 100.
13) Get a number from user and print whether it is positive, negative
or zero.
14) Get a character from user and print whether it is an alphabet or
not.
15) Write a program that calculates volume of a sphere.
16) Write a program that print smallest of three numbers.
17) Write a program that calculates area of a circle.
18) Write a program that performs arithmetic operations on user’s
choice.
19) Write a program that converts temperature from Fahrenheit to
Celsius.
20) Write a program that converts temperature from Celsius to
Fahrenheit.
21) Write a program that prints squares of first 10 natural numbers.
22) Write a program that gets a number (n) from the user and
calculates 2n .
23) Write a program that input marks of a student and print whether
he is “Pass” or “Fail”.
24) Write a program that prints cubes of first 10 natural numbers.
25) Write a program that gets a number from the user and print
whether it is divisible by 7 or not.
26) Write a program that input year from the user and print whether it
is a leap year or not.
27) Write a program that gets a number from the user and calculates
its square root.
28) Write a program that calculates cube of a number entered by a
user.
29) Get a three-digit number from user and find the middle number.
30) Write a program that reverses the value of a number entered by a
user.

Prof. Junaid Javaid


Head. Department of Computer Science

You might also like