0% found this document useful (0 votes)
161 views2 pages

CC1021 Assignment 2

This document provides instructions for Assignment 2 of the CC1021 - Programming Fundamentals course. Students must complete 3 questions by the deadline of November 28, 2019. Question 1 (5 marks) requires a program that determines if a user-input number is even or odd. Question 2 (5 marks) requires a program that maps user-input numbers 1-7 to corresponding days of the week. Question 3 (15 marks) requires a program to calculate a salesperson's earnings based on a $200 weekly salary plus 9% commission on gross sales.
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)
161 views2 pages

CC1021 Assignment 2

This document provides instructions for Assignment 2 of the CC1021 - Programming Fundamentals course. Students must complete 3 questions by the deadline of November 28, 2019. Question 1 (5 marks) requires a program that determines if a user-input number is even or odd. Question 2 (5 marks) requires a program that maps user-input numbers 1-7 to corresponding days of the week. Question 3 (15 marks) requires a program to calculate a salesperson's earnings based on a $200 weekly salary plus 9% commission on gross sales.
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/ 2

CC1021 – Programming Fundamentals

Assignment 2 – Fall 2019

Deadline: Thursday, November 28, 2019 Last Saved by: Mustahsan Hammad Naqvi
Instructions:
1. Type your name and Student ID at the places mentioned Student ID :
2. Save the document with your student ID
a. 19014020001 Ahmad.zip Name:
b. The Zip file must contain files in following format
i. ID_Name_AssignmentNo_QNo.c/cpp Batch:
c. Each File must contain comments
3. Upload your assignment through http://lms.skt.umt.edu.pk Program:
4. No marks would be awarded if
a. Assignment is copied
b. File is corrupt/does not open
c. Submitted through email/in-person
d. Files in ZIP/RAR file are other than .c / .cpp files

DO NOT FORGET TO ADD COMMENTS in the following format at the top of your program
/*
ID 19014020001
Name Ahmad
Study Program BSCS/SE/IT
Assignment No 2
Question No 1 or 2
Program Description This program adds two numbers
Development Environment Dev C++ 4.9.050
Code Last Modified on Date
*/
CC1021 – Programming Fundamentals

Assignment 2 – Fall 2019

Attempt each question. Marks are specified with each question. 25 – Marks

Q 1. Write a C++ program that accepts a number and tells the user whether the number is Even or Odd.
Use constructs learned in the class. 5 Mark(s)
Q 2. Write a program that takes an integer from the user and then displays its corresponding Day of
the Week. E.g. if the user enters 1 it should display Monday, for 2 its Tuesday and so on. If the
value exceeds 7 it should display a message “invalid input” and beep. (do not use switch
statement) 5 Mark(s)
Q 3. A large company pays its salespeople on a commission basis. The salespeople each receive $200
per week plus 9% of their gross sales for that week. For example, a salesperson who sells $5000
worth of chemicals in a week receives $200 plus 9% of $5000, or a total of $650. Develop a C++
program that uses a asks the user about his/her gross sales for last week and calculates and
displays that salesperson’s earnings. 15 Mark(s)

You might also like