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
Assoli18 [71]
3 years ago
9

Rita is writing a C++ programe in whic, she wants to display the grades (stored in variable grade) as per the table of marks (st

ored in variable marks) given below: A – 90-100 B – 80-89 C – 70-79 D < 70
Computers and Technology
1 answer:
qwelly [4]3 years ago
7 0
#include <iostream>
#include <vector>
using namespace std;

class Student
{
public:    
    Student(int mark)    
    {        
        this->mark = mark;

        if (mark >= 90 && mark <= 100)
            grade = 'A';
        else if (mark >= 80 && mark <= 89)            
            grade = 'B';
        else if (mark >= 70 && mark <= 79)
            grade = 'C';
        else if (mark < 70 && mark >= 0)
            grade = 'D';
        else
            cout << "Invalid mark, grade not assigned";
    }

    int getMark()
    {
        return mark;
    }

    char getGrade()
    {
        return grade;
    }

private:
    int mark;
    char grade;
};

int main()
{
    vector<Student> students;
    int num, mark;

    cout << "Enter number of students: ";
    cin >> num;

    if (num <= 0)
        cout << "Invalid number of students, exiting";
    else
    {
        for (int i = 1; i <= num; i++)
        {
            cout << "Enter marks for student " << i << ": ";
            cin >> mark;

            Student s(mark);
            students.push_back(s);
        }
    }

    // do whatever you like with the vector from here onwards, such as:
    /*
    for (int i = 0; i < students.size(); i++)
    {
        cout << "Student " << i + 1 << " grade: " << students[i].getGrade() << endl;
    }
    */

    return 0;
}
You might be interested in
Hidden costs of computers into our schools
Gala2k [10]

Answer:

There are certainly many hidden costs, and you need to find them out. I am listing some. The GPU can cost a lot if you are using them for complex computing like in the case of Bitcoin. You need to pay heavy electricity bills as well. And if you want to install the webserver then as well, you need to keep your computer open all the time, and pay a good sum as an electricity bill. Many more hidden costs can be found. And one out of above is used in Schools, the webserver. Some more hidden costs can be Network cost, as the school is big, and you need to connect all through LAN, and at times we also need WAN set up. And these are another hidden cost. Various education licenses come for free, and smart classes cost as well. The video conferencing, VOIP, etc costs as well. Smart classes training by various computer training institute for teachers like one from adhesive.

Explanation:

Please check the answer section.

6 0
3 years ago
​What file system below does not support encryption, file based compression, and disk quotas, but does support extremely large v
Elena L [17]

Answer:

D.  ReFS

Explanation:

File system is simply a management system for files that controls how and where data are stored, where they can be located and how data can be accessed. It deals with data storage and retrieval.

Examples of file system are NTFS, FAT(e.g FAT 16 and FAT 32), ReFS.

ReFS, which stands for Resilient File System, is designed primarily to enhance scalability by allowing for the storage of extremely large amounts of data and efficiently manage the availability of the data. It is called "resilient" because it ensures the integrity of data by offering resilience to data corruption. It does not support transaction, encryption, file based compression, page file and disk quotas, to mention a few.

6 0
3 years ago
Jim, the IT director, is able to complete IT management task very well but is usually two weeks late in submitting results compa
oee [108]

Answer:Effective but not efficient

Explanation:

Jim is effective because he was able to complete the IT tasks well but he is not efficient because he didn't submit the result on time because being efficient includes management of time.

5 0
3 years ago
____ map a set of alphanumeric characters and special symbols to a sequence of numeric values that a computer can process.
Neporo4naja [7]
The answer is : coding schemes
4 0
3 years ago
What is an example of the most important role of a systems analyst in any corporation?
dsp73

Answer: The system analyst is one of the most important members in any organisation. These system analyst has to analyse different data of the organisation which would help to bring out the different any new business policy changes or any kind of improvement.

Explanation:

An example to know this better would be the system analyst of a telecom company. Here the role of the system analyst would be bring out the design and implementation of new telecom information system and also should be aware of previous data of the organization. The system analyst would also be responsible to bring out the new business policies based on latest telecom standards and ensure the systems conforms to the latest standards.

5 0
2 years ago
Other questions:
  • WHAT DOES THE WORD MONOCHROME MEAN?
    11·1 answer
  • : How does the founder of Wikipedia keep a tight reign on accuracy? HELP PLEZ AT LEAST A PARGRAPH PLES
    6·1 answer
  • (1) In Tamara's science class, the students are learning Which sentence shows an action that is extrinsically
    7·1 answer
  • Which of these is the proper flow for an Auto Trans cooling system?
    7·2 answers
  • A(n) __________ port, also known as a monitoring port, is a specially configured connection on a network device that is capable
    13·1 answer
  • IRQ 0 interrupt have _______________ priority<br> ? low<br> ? medium<br> ? highest<br> ? lowest
    13·1 answer
  • How are computers 35 years ago and how are they presently and how are they going to be in the next 35 years
    9·1 answer
  • Along a road lies a odd number of stones placed at intervals of 10 metres. These stones have to be assembled around the middle s
    12·1 answer
  • Can someone tell me what this means Higfaa
    6·1 answer
  • you manage a network that has multiple internal subnets. you connect a workstation to the 192.168.1.0/24 subnet. this workstatio
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!