CS201P Assignment 1 Solution Fall 2024
CS201P Assignment 1 Solution Fall 2024
VUAnswer.pk
CS201P ASSIGNMENT 1 SOLUTION FALL 2024
You must submit only a .cpp file on the assignments interface of CS201P from your LMS
account.
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.
Question Task
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.
Solution
CODE:
#include <iostream>
#include <algorithm>
using namespace std;
GET MORE SOLUTIONS FILE FROM
VUAnswer.pk
int main() {
const string studentID = "BC123456789";
const string studentName = "Sarim";
string grade;
if (average >= 90) grade = "A";
else if (average >= 80) grade = "B";
else if (average >= 70) grade = "C";
else if (average >= 60) grade = "D";
else grade = "F";
cout << "\nMarks has been entered. Here is your result:" << endl;
cout << "Obtained marks out of 300: " << s1 + s2 + s3 << endl;
cout << "Average Marks: " << average << endl;
cout << "Grade: " << grade << endl;
cout << "Highest Mark: " << highest << endl;
cout << "Lowest Mark: " << lowest << endl;
return 0;
}
GET MORE SOLUTIONS FILE FROM
VUAnswer.pk
OUTPUT:
GET MORE SOLUTIONS FILE FROM
VUAnswer.pk
REGARD - SARIM
WHATSAPP +923162965677
PLEASE NOTE:
Don't copy-paste the same solution.
Make sure you can make some changes to your solution file before
submitting copy paste solution will be marked zero.
If you found any mistake then correct yourself and inform me.
Before submitting an assignment must check your assignment requirement
file.
If you need some help or question about file and solutions feel free to ask.
VUAnswer.pk