(a) A class "Student" has three data members: student_name, enrolment_no, marks of 5 subjects
and member function to assign streams on the basis of the criteria given below: 6
Average Marks Stream
>90% Computer Science
> 80 - 90% Science
>75 - 80% Commerce
>70 - 75% Arts
Below 70% Vocational
Write a C++ program to calculate average marks of each student and display student name,
enrolment no, and their stream.
1
Expert's answer
2018-06-01T04:56:45-0400
/// main.cpp #include "Student.h"
#include <iostream> #include <string>
int main() { std::string name; unsigned num; unsigned marks[MARKS_NUM]; std::cout << "Prompt a student name: "; std::cin >> name; std::cout << "Prompt a student enrolment no: "; std::cin >> num; std::cout << "Prompt a student 5 marks: "; for (unsigned i = 0; i < MARKS_NUM; i++) std::cin >> marks[i];
Comments
Leave a comment