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

Spring 2023 - CS101 - 2

The document provides instructions for a C++ programming assignment. Students must write a program to calculate total and average marks for a student, determine their final grade based on thresholds, and output the results. The submission must include C++ code and a screenshot of the output in a Word file by the deadline.

Uploaded by

Pubg madness
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Spring 2023 - CS101 - 2

The document provides instructions for a C++ programming assignment. Students must write a program to calculate total and average marks for a student, determine their final grade based on thresholds, and output the results. The submission must include C++ code and a screenshot of the output in a Word file by the deadline.

Uploaded by

Pubg madness
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Total marks = 20

Introduction To Computing
(CS101) Deadline
Assignment No. 02 11th ofJuly, 2023
Spring 2023
Please carefully read the following instructions before attempting the assignment.

RULES FOR MARKING


It should be clear that your assignment would not get any credit if:
 The assignment is submitted after the due date.
 The submitted assignment does not open or the file is corrupt.
 Strict action will be taken if the submitted solution is copied from any other student
or the internet.

You should consult the recommended books to clarify your concepts if video lessons/handouts
are not sufficient.

You are supposed to submit your assignment in Doc or Docx format.


Any other formats like scan images, PDF, ZIP, RAR, PPT, BMP, TXT, etc. will not be accepted.

Topic Covered: Week 09 (Lesson no. 109 to 125)

Objectives:

 To learn the use of C++ Variables, Mathematical Operators, Logical Operators.


 To learn the use of “if/if-else” structure in C++.
 To have hands on practice of computer programming.

NOTE

No assignment will be accepted after the due date via email in any case (whether it is the case
of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignments
in the last hour of the deadline. It is recommended to upload the solution file at least two days
before its closing date.

If you people find any mistake or confusion in the assignment (Question statement), please
consult with your instructor before the deadline. After the deadline , no queries will be
entertained in this regard.

For any query, feel free to email me at:


[email protected]
Questions No. 01 Marks (15 for code + 5 for output screenshot)

Deciding the Final Grads of various students manually is a tedious and challenging task. Your job is to
develop a C++ program that should be capable of calculating the Total and Average Marks of a student.
Based on the above calculations the program should award the correct Final Grad to a student. Following
is the sample screenshot of the Input and Output of a student.

Working Mechanism:

The program should allow the users to enter their OWN VU-ID and any random marks for four subjects
CS, Math, Pak Study, and MGT. Then, the Total marks and Average Marks are calculated using
mathematical operators on variables for each subject. The program should use Control Structure “if or if-
else” and “Logical Operator(s)” to decide the final grad of a student based on the Average Marks. Also,
the following score limits should be implemented in your program to grant Correct grad to a student as
per the following upper and lower score bounds/limits. For example, if a student got Average Marks 86
then Grad “A- “should be awarded as present in the sample screenshot.

Lower and upper bounds for grads:

91 to100 => Grad: A+


81 to 91 => Grad: A-
71 to 81 => Grad: B+
61 to 71 => Grad: B-
51 to 61 => Grad: C
41 to 51 => Grad: D
35 to 41 => Grad: E
34 to 0 => Fail
How/What to submit as assignment solution?

Write your code in a compiler application and run it to generate the output. After that copy your
code and paste it into a Microsoft Word document (your solution file). Also, take a screenshot of
your program’s output and paste it into the solution file along with the code.

You can use any online or offline C++ compiler for writing your code for the assignment solution. Few
links for the online compilers are given below:
https://www.onlinegdb.com/online_c++_compiler
https://www.w3schools.com/cpp/cpp_compiler.asp

Hint:
“cin>>” command is used in C++ programs to take some input from the user during the program
execution.

Note:
 Your solution file must be a Microsoft Word document (in .doc or .docx file extension).
 Solution file must contain both code and the output screenshot of your code. No marks will be
awarded in case any of these (code/output) is missing.
 It is mandatory to use your own Student ID in the program (No marks will be awarded if the
student’s personal information is missing/copied or the VUID of some other student is used).

You might also like