You are on page 1of 2

National University of Computer & Emerging Sciences, Karachi

Spring-2018 Computer Science Department

Deadline: 19 Sept 2018, 2 PM


Instructions:
MUST INCLUDE FLOW CHART WITH PROGRAM.
Assignment should be submitted in class. No later assignment will be acceptable.
It is a hand-written assignment. (Print the output screen shots with each question)
Your hand witting must be clear and readable. Start each question from next page.
Make sure your cover page possesses the following details.
Assignment No
Std.Id
Name
Section
Q 1. Given as input an integer number of seconds, print as output the equivalent
time in hours, minutes and seconds. Recommended output format is something
like
“7322 seconds is equivalent to 0 days, 2 hours 2 minutes 2 seconds”
Q 2. Write a program that reads in the radius of a circle and prints the circle’s
diameter, circumference and area. Use the constant value 3.14159 for π.
Perform each of these calculations inside the printf statement(s) and use the
conversion specifier %f.
Q 3. Write a program that prints the following shapes with asterisks. Write
another program which prints your ID using asterisks in similar manner.

Q 4. Write a program which takes input a number and convert it to different money
notes (100, 10, 5, 3, 2, 1) . For example, input is 125, the output should be:
“There are 1, 100 bills, 2, 10 bills, 1, 5 bills, 0, 3 bills, 0, 2 bills, 0, 1 bill”.
The output should have your ID as input, ex: 18K-1139 becomes
181139
Q 5. Write a program which takes of grades in Mid 1, Mid 2, Quiz, Assignment and
Final. The weight is equally distributed in all exams (20 for all and total 100).
Calculate total and percentage for the students.

1 OF 1
BEST OF LUCK!

2 OF 1

You might also like