0% found this document useful (0 votes)
32 views

CS Practical list for SSC 2

The document outlines a practical list of programming exercises for SSC-II (2025) that cover various topics such as salary calculation, temperature conversion, pattern printing, and basic mathematical operations. Each exercise requires writing a program to perform specific tasks, including calculations, input handling, and function creation. The exercises aim to enhance programming skills and understanding of fundamental concepts.

Uploaded by

Waqas Ali
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)
32 views

CS Practical list for SSC 2

The document outlines a practical list of programming exercises for SSC-II (2025) that cover various topics such as salary calculation, temperature conversion, pattern printing, and basic mathematical operations. Each exercise requires writing a program to perform specific tasks, including calculations, input handling, and function creation. The exercises aim to enhance programming skills and understanding of fundamental concepts.

Uploaded by

Waqas Ali
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/ 3

Practical list for SSC-II (2025)

Exercise No. 1
Write a program that should take working hours and overtime hours of employee as input. The program should
calculate and display the total salary of employee.

Exercise No. 2
Write a program that takes Celsius temperature as input, converts the temperature into Fahrenheit and shows the
output.

Exercise No. 3
Write a program that displays the following output using single printf statement.

 Such as * * * *
 And 1 2 3 4

Exercise No. 4
Write a program that displays the following output using single printf statement: I am a Boy I live in Pakistan I am
a proud Pakistani.

Exercise No. 5
A cloth brand offers 15% discount on each item. A lady buys 5 shirts from this brand. Write a program that
calculates total price after discount and amount of discount availed by the lady. Original prices of the shirts are:

Exercise No. 6
Write a program that swaps the value of two integer variables without help of any third variable.

Exercise No. 7
Write a program that takes a 5-digit number as input, calculates and displays the sum of first and last digit of
number.

Exercise No. 8
Write a program that takes monthly income and monthly expenses of the user like electricity bill, gas bill, food
expense. Program should calculate the following.

Exercise No. 9
Write a program that takes radius of a circle as input. The program should calculate and display the area of circle.

EXERCISE 10:

Write a program that takes two integers as input and tells whether first one is a factor of the second one?

EXERCISE 11:

Write a program that takes total bill as input and tells how much discount the user has got and what the
discounted price is?

EXERCISE: 12
Write a program that takes as input, the original price and sale price of a product and tells whether the product is
sold on profit or loss. The program should also tell the profit/loss percentage.

EXERCISE: 13

Write a program that takes as input, the lengths of 3 sides of a triangle and tells whether it is a right-angle triangle
or not? For a right-angled triangle, Hypotenuse2= base2 + height2

EXERCISE: 14

Following is the eligibility criteria for admission in an IT University.


 At least 60% marks in Matric.
 At least 65% marks in Intermediate (Pre-Engineering or ICS)
 At least 60% marks in entrance test
Write a program that takes as input, the obtained and total marks of Matric, Intermediate and Entrance Test. The
program should tell whether the students is eligible or not.

EXERCISE 15

Use loops to print following patterns on console.

a)

*****

*****

*****

b)

BC

DEF

GHIJ

EXERCISE 16

Write a program that takes two positive integers a and b as input and displays the value of ab.

EXERCISE 17

Write a program that takes two numbers as input and displays their Greatest Common Divisor (GCD) using
Euclidean method.

EXERCISE 18

Write a program to display factorials numbers from 1 to 7. (Hint: Use Nested Loops)

EXERCISE 19

Write a program that takes 10 numbers as input in an array and displays the product of first and last element on
console.

Exercise 20

Write a function int square(int x); to calculate the square of an integer x.

Exercise 21
Write a function to calculate factorial of a number.

Exercise 22

Write a function which takes values for three angles of a triangle and prints whether the given values make a valid
triangle or not. A valid triangle is the one, where the sum of three angles is equal to 180.

Exercise 23

Write a function which takes the amount and the interest percentage and return the interest amount.

Exercise 24

Write a function to print the table of a number.

You might also like