Computer Science, asked by hassaanchaudhary78, 5 months ago

Write a C++ program to calculate the result of three sections of a semester. Following are the rules for result:

Three are 3 sections.

Each section has 8 students.

Each student takes 5 courses.

Marks for each subject of every student of each section must be taken from the user.
Calculate the result of every student of each section as follows:

Obtained marks (Sum of all courses marks). Max. marks of each subject are 100

Percentage

Answers

Answered by pragatibhatt2922
0

Answer:

#love....

Explanation:

In this program, a structure(student) is created which contains name, roll and marks as its data member. Then, a structure variable(s) is created. Then, data (name, roll and marks) is taken from user and stored in data members of structure variable s. Finally, the data entered by user is displayed.

#include <iostream>

using namespace std;

struct student

{

   char name[50];

   int roll;

   float marks;

};

int main()  

{

   student s;

   cout << "Enter information," << endl;

   cout << "Enter name: ";

   cin >> s.name;

   cout << "Enter roll number: ";

   cin >> s.roll;

   cout << "Enter marks: ";

   cin >> s.marks;

   cout << "\nDisplaying Information," << endl;

   cout << "Name: " << s.name << endl;

   cout << "Roll: " << s.roll << endl;

   cout << "Marks: " << s.marks << endl;

   return 0;

Similar questions