Computer Science, asked by moremahesh6331, 5 months ago

Difficult Subject

The principal of the School has asked Sankey to create a tool which will analyze students score and identify subjects that students find difficult to crack. Below are scores of students for given subjects. Write a program that will take the below data and identify the subject that students find difficult to crack.

Subject's (Max. Marks) Students

Meera

Subodh

Kunal

Soni

Richu

Irene

Vijay

English

(60)

100

80

90

60

50

40

80

History

(40)

80

70

70

60

90

60

80
program in c++​

Answers

Answered by bhakarepranjali
0

Answer:

here this your answer

Explanation:

make a brilliant

Attachments:
Answered by mindfulmaisel
1

Identify the subject that students find difficult to crack

Explanation:

program that will take the below data and identify the subject that students find difficult to crack.

#include<bits/stdc++.h>

using namespace std;

class Marks{

public:

   string Name="";

   int english = 0, history = 0;

   Marks(){

       Name="";

       english = 0;

       history = 0;

   }

   Marks(string Name, int english, int history){

       this->Name = Name;

       this->english = english;

       this->history = history;

   }

};

int main(){

   int n=0;

   cout << "Enter no. of students: ";

   cin >> n;

   Marks mk[n];

   for(int i=0; i<n; i++){

       cout << "\nEnter student name : ";

       cin >> mk[i].Name;

       cout << "Marks in english: ";

       cin >> mk[i].english;

       cout << "Marks in history: ";

       cin >> mk[i].history;

       

   }

   cout << "\n";

   for(int i=0; i<n; i++){

       

       if(mk[i].english<=60 && mk[i].history<=40) cout << mk[i].Name << " is week in both English and History\n";

       else if (mk[i].english<=60)  cout << mk[i].Name << " is week in both English \n";

       else if (mk[i].history<=40)  cout << mk[i].Name << " is week in both History \n";

       

   }

   return 0;

}

hence, this is program that will take the below data and identify the subject that students find difficult to crack.

Similar questions