Question: replace the answer word with your answer Complete the following program with appropriate C++ statements. This program stores the information of 40 students using structures.

replace the answer word with your answer

Complete the following program with appropriate C++ statements. This program stores the information of 40 students using structures. Declare a structure to represent mark with two (2) members of type float; carry marks and f i n a l e x a m. Then, create a structure named Student with three (3) members. The members include ID of type char array with size 10, name of type char array with size 40, and subject of type Mark. Store 40 input data in an array named stdn of type Student . Print out a list of students who pass the subject ((carry marks plus f i n a l e x a m is 50 or more). Note: Please write C ++ statements WITHOUT blank spaces unless it is absolutely needed. Example: int num,a,b;

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 
#include  #include  using namespace std;  int main() {  /*a) Declare structure named Mark with 2 members of type float named carrymark and f i n a l e x a m (3 marks)*/ Answer { Answer; Answer; };   /*b) Declare structure named Student with 2 members of type array of char named ID and name with size 10 and 40, and one member of type Mark named subject (4 marks)*/ Answer { Answer; Answer; Answer; };   const int SIZE = 40;   /*c) Define array named stdn of type Student with size 40. Note: use the declared SIZE constant (2 marks) Answer;   //Get input data  cout << "Enter students' information: " << endl; for (int i = 0; i < SIZE; i++) {  cout << "STUDENT - " << i+1 << endl; cout << "Enter student name: "; //d) Get input for student name (1 mark)  cin.getline(Answer, 40);  cout << "Enter student ID: "; //e) Get input for student ID (1 mark) cin >> Answer;   cout << "Enter carry mark: "; //f) Get input for carry mark (2 marks) cin >> Answer; cout << "Enter f i n a l e x a m: "; //g) Get input for f i n a l e x a m (2 marks) cin >> Answer; }  cout << List of students pass the e x a m: ;  for (int i = 0; i < SIZE; i++) {  float total;   /*h) Calculate total mark, carry marks plus f i n a l e x a m (2 marks)*/ Answer;  cout << "Length of line - " << i+1 << " is ";  /*i) Display student ID and name for the student who pass (3 marks)*/ if (Answer) cout << Answer << " " << Answer << endl;  }   return 0; }  

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!