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

Deadline: 19 Sept 2018, 2 PM: National University of Computer & Emerging Sciences, Karachi

The document provides instructions for a computer science assignment due on September 19, 2018 at 2 PM. It includes 5 questions to answer in a handwritten assignment submitted in class. Question 1 asks students to write a program that converts seconds to hours, minutes and seconds. Question 2 asks students to write a program that calculates and prints the diameter, circumference and area of a circle given the radius. Question 3 asks students to print shapes with asterisks and print their student ID using asterisks. Question 4 asks students to write a program that takes a number as input and converts it to different money denominations. Question 5 asks students to write a program that calculates the total and percentage for a student given their grades in various exams and assignments.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Deadline: 19 Sept 2018, 2 PM: National University of Computer & Emerging Sciences, Karachi

The document provides instructions for a computer science assignment due on September 19, 2018 at 2 PM. It includes 5 questions to answer in a handwritten assignment submitted in class. Question 1 asks students to write a program that converts seconds to hours, minutes and seconds. Question 2 asks students to write a program that calculates and prints the diameter, circumference and area of a circle given the radius. Question 3 asks students to print shapes with asterisks and print their student ID using asterisks. Question 4 asks students to write a program that takes a number as input and converts it to different money denominations. Question 5 asks students to write a program that calculates the total and percentage for a student given their grades in various exams and assignments.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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