0% found this document useful (0 votes)
35 views3 pages

Fall 2024 - CS201P - 1

Uploaded by

mr5395793
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views3 pages

Fall 2024 - CS201P - 1

Uploaded by

mr5395793
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment No.

1 Total Marks: 20

Semester: Fall 2024 th


Due Date: 7 November
CS201P – Introduction to Programming(Practical) 2024

Instructions
Please read the following instructions carefully before submitting the assignment:
It should be clear that your assignment will not get any credit if:

● Assignment is submitted after the due date.


● Submitted assignment does not open or file is corrupt.
● Assignment is copied (From the internet/students).
● Assignment is submitted in any file format other than .cpp.

Recommended tool to develop Assignment


● Dev C++

Objectives:
To enable students to understand and practice the concepts of:
● Basic structure of C++
● If/else statements
● While loop

Assignment Submission Instructions


You must submit only a .cpp file on the assignments interface of CS201P from your LMS account.
Assignments submitted in any other format(image, pdf, doc, docx, etc) will be scaled with zero
marks. So, check your solution file format before submission.
For any query related to the assignment, please contact [email protected].

Assignment

Develop a console-based application that allows students to input their marks for Any three subjects. The
application should calculate and display the obtained marks, average marks, grade, highest marks, and
lowest marks based on the entered values.

The program should:


1. Your student id and name must be displayed before the result ( No need to prompt student id and
name from the user, you can just hard-code it).
2. Prompt the user to enter marks for any three subjects, ensuring that the entered marks for each
subject do not exceed 100.
3. Compute the average of the entered marks.
4. Calculate the grade based on the average marks.
o Grade A: Average >= 90
o Grade B: Average >=80
o Grade C: Average >=70
o Grade D: Average >= 60
o Grade F: Average < 60
5. Identify the highest marks among the subjects.
6. Identify the lowest marks among the subjects.
7. Display the obtained marks.
8. Display the calculated results (average, grade, highest and lowest marks).
Requirements:
1. Use a while loop structure for repetitions like inputting multiple marks.
2. Use if else structure for decision. This will allow the program to determine the highest and lowest
marks entered, as well as to assign grades based on the calculated average.
3. Use const where appropriate to protect data that should not be modified.

Sample screenshot:
Syllabus:

The syllabus for this assignment includes all topics covered from Lab 1 to Lab 2.

Note: Remember that if you have not used your name and student id in the program your
marks will be deducted. Also, printf and scanf are not allowed.

Best of luck!

You might also like