Course Code: Csl-113 Course Title: Computer Programming Lab Assignment 1
Course Code: Csl-113 Course Title: Computer Programming Lab Assignment 1
ASSIGNMENT 1
Q1: Write a program to display the following format using while loop
----------------------------------
A B
----------------------------------
1 5
2 4
3 3
4 2
5 1
Q2: Write a program to display the following format using while loop
----------------------------------
A B
----------------------------------
1 1
2 3
3 6
4 10
5 15
Q3: Write a program to display the following format using loop
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Q4: Write a program that inputs the salary of an employee from the user. It deducts the income tax
from the salary on the following basis
1) 20% income tax if the salary is above Rs. 30000.
Q5: Write a program that display the following menu for parking area
M =Motorcycle
C =Car
B =Bus
The program inputs the type of vehicle and number of days to park the vehicle. It finally displays the
total charges for the parking according to the following:
Q6: Write a program that inputs a value and type of conversion. The program should then display the
output after conversion. The program should include the following conversions:
Q7: Write a program using nested for loop to display multiplication table as follows
1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25
Q8: write a program that generates the following checker card by using loop.
-----------------
----------------
-----------------
----------------
-----------------
----------------
Submission Details:
This is an Individual assignment.