1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Natali5045456 [20]
2 years ago
8

1. Write programming code in C++ for school-based grading system. The program should accept the Subject and the number of studen

ts from a user and store their details in an array of type Student (class). The student class should have: • studName, indexNo, remarks as variables of type string, marks as integer, and grade as char. • A void function called getData which is used to get students’ details (index number, name, and marks). • A void function called calculate which will work on the marks entered for a student and give the corresponding grade and remarks as give below. Marks Grade Remarks 70 – 100 A Excellent 60 – 69 B Very Good 50 – 59 C Pass 0 – 49 F Fail • Should be able to display the results for all students (index number, name, marks, grade, remarks). 2. Draw a flowchart for the calculate function above
Computers and Technology
1 answer:
satela [25.4K]2 years ago
7 0

In this program, I am using the school-based grading system and the program should accept the subject and the number of students.

Program approach:-

  • Using the necessary header file.
  • Using the standard I/O namespace function.
  • Define the main function.
  • Declare the variable.
  • Display enter obtain marks in 5 subjects.
  • Return the value.

Program:-

//header file

#include<iostream>

//using namespace

using namespace std;

//main method

int main()

{

//declare variable

  int j;

  float mark, sum=0, a;

//display enter obtain marks in 5 subjects

  cout<<"Enter Marks obtained in 5 Subjects: ";

  for(j=0; j<5; j++)

  {

      cin>>mark;

      sum = sum+mark;

  }

  a = sum/5;

//display grade

  cout<<"\nGrade = ";

  if(a>=91 && a<=100)

//display a1

      cout<<"a1";

  else if(a>=81 && a<91)

//display a2

      cout<<"a2";

  else if(a>=71 && a<81)

      cout<<"b1";

  else if(a>=61 && a<71)

      cout<<"b2";

  else if(a>=51 && a<61)

//display c1

      cout<<"c1";

  else if(a>=41 && a<51)

//display c2

      cout<<"c2";

  else if(a>=33 && a<41)

//display d

      cout<<"d";

  else if(a>=21 && a<33)

//display e1

      cout<<"e1";

  else if(a>=0 && a<21)

//display e2

      cout<<"e2";

  else

//display invalid

      cout<<"Invalid!";

  cout<<endl;

//return the value

  return 0;

}

Learn more grading system

brainly.com/question/24298916

You might be interested in
Greg works for online games development company. He occasionally visits online literature sites and downloads e-books of his cho
zalisa [80]

(A) Yes, because nobody is supposed to access non-work related sites during office hours.

3 0
3 years ago
Read 2 more answers
You are configuring a network attached storage (nas) appliance. what file sharing protocol(s) could you use to allow access to w
kicyunya [14]

Most clients should support Server Message Block (SMB)/Common Internet File System (CIFS).

<h3>What is CIFS used for?</h3>

Common Internet File System (CIFS) is a network filesystem protocol used for providing shared access to files and printers between machines on the network. A CIFS client application can read, write, edit and even remove files on the remote server.

<h3>What are CIFS servers?</h3>

CIFS stands for “Common Internet File System.” CIFS is a dialect of SMB. That is, CIFS is a particular implementation of the Server Message Block protocol, created by Microsoft.

To learn more about Internet File System , refer

brainly.com/question/13008468

#SPJ4

6 0
1 year ago
How does this happen on brainly????
Trava [24]

what do you mean????

4 0
2 years ago
Read 2 more answers
Which of the following statements is/are true? (Points : 5) A. A default constructor is automatically created for you if you do
snow_lady [41]

Answer: Only A and C

Explanation: Default constructor is a constructor that has parameters with the values that are default or has no arguments/parameter present. Default constructor is not declared in the class rather it gets generated by itself when not defined.

Class is defined with data members, functions, objects etc are considered as per the requirement given by the user .It is the user defined concept.

Statement (B) is incorrect because static method is used for accessing the static members of the particular class and manipulate the value of it.

Thus, only statement (A) and (C) are correct.

6 0
3 years ago
A degree-constrained minimum spanning tree is a minimum spanning tree (MST) where the maximum vertex degree is limited to a cert
Bingel [31]

Answer:

A spanning tree is a subset of Graph G, which has all the vertices covered with minimum possible number of edges. Hence, a spanning tree does not have cycles and it cannot be disconnected..

By this definition, we can draw a conclusion that every connected and undirected Graph G has at least one spanning tree. A disconnected graph does not have any spanning tree, as it cannot be spanned to all its vertices.

Spanning Trees

We found three spanning trees off one complete graph. A complete undirected graph can have maximum nn-2 number of spanning trees, where n is the number of nodes. In the above addressed example, n is 3, hence 33−2 = 3 spanning trees are possible.

General Properties of Spanning Tree

We now understand that one graph can have more than one spanning tree. Following are a few properties of the spanning tree connected to graph G −

A connected graph G can have more than one spanning tree.

All possible spanning trees of graph G, have the same number of edges and vertices.

The spanning tree does not have any cycle (loops).

Removing one edge from the spanning tree will make the graph disconnected, i.e. the spanning tree is minimally connected.

Adding one edge to the spanning tree will create a circuit or loop, i.e. the spanning tree is maximally acyclic.

Explanation:

8 0
3 years ago
Other questions:
  • You have found statistics on the Internet that you would like to use in your speech.
    6·1 answer
  • You save $500 in a retirement account at age 25. it increases an average of 10% per year until you are 65. which formula and res
    13·1 answer
  • In order to achieve a win-win solution, all parties involved should negotiate a solution. True or False ?
    13·2 answers
  • Based on your research and understanding, write a 3- to 4-page Microsoft Word document that:
    11·1 answer
  • If you wanted to have wireless connectivity in your home or​ apartment, you would need a​ _________________ to move packets of d
    11·1 answer
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    14·2 answers
  • What is the correct process for selecting an entire row in a spreadsheet?
    10·1 answer
  • What invention in the past do you think had a significant impact on our culture/ lifestyle? What do you think will be invented/
    11·1 answer
  • Which view in the View tab of the ribbon is the easiest place to add a header or a footer? Normal view Custom Views Page Layout
    5·2 answers
  • Describe the five components of a computer
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!