Uploaded by Adden Ilyas

Assignment

advertisement
Assignment No. 02
Introduction to Computer Programming – CSC141
Submission Deadline: Monday, 4th November, 2019
Note: Any/all material found copied will be marked zero and the assignments discarded. Both the original
and copied assignments will be treated equally
Task 01: Write a program to determine whether a year entered through the keyboard is a leap
year or not. Also determine whether the year is your year of birth, starting your school, start or
end of matriculation (or O-levels etc), start or end of Intermediate education (FSc, A-levels,
ICOM, ICS etc) or year of starting your education in COMSATS University?
(05 Marks)
Task 02: Write a program to find the greatest and smallest of the three numbers entered through
the keyboard using conditional operators.
(05 Marks)
Task 03: Write a program to find power/exponent of a given number. Take number and power
as input from user.
(05 Marks)
Instructions:


Hand written hard copy of assignment should be submitted before deadline.
Marks will be deducted if indentation is not done properly in code.
COMSATS University
Download