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
nevsk [136]
3 years ago
10

Write a C++ program that manage the student’s grades. Starting with a fixed number of students (use 10 for simplicity) the user

will input the grades for each student. The number of grades is given by the user. The grades are stored in an array. Two functions are called for each student. One function will give the numeric average of their grades. The other function will give a letter grade to that average. Grades are assigned on a 10-point spread. 90-100 A 80- 89 B 70-79 C 60-69 D Below 60 F
Computers and Technology
1 answer:
BigorU [14]3 years ago
5 0

Answer:

#include <iostream>

using namespace std;

float findAverage(double grades[], int numOfgrades) {

   float sum = 0;

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

       sum += grades[i];

   }

   return (sum / numOfgrades);

}

char findLetterGrade(double grades[], int numOfgrades) {

   char letter;

   if(findAverage(grades, numOfgrades) >= 90 && findAverage(grades, numOfgrades) <= 100)

       letter = 'A';

   else if(findAverage(grades, numOfgrades) >= 80 && findAverage(grades, numOfgrades) <= 89)

       letter = 'B';

   else if(findAverage(grades, numOfgrades) >= 70 && findAverage(grades, numOfgrades) <= 79)

       letter = 'C';

   else if(findAverage(grades, numOfgrades) >= 60 && findAverage(grades, numOfgrades) <= 69)

       letter = 'D';

   else if(findAverage(grades, numOfgrades) >= 0 && findAverage(grades, numOfgrades) <= 59)

       letter = 'F';

       

   return letter;

}

int main()

{

   int numOfgrades, grade;

   

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

       cout<<"Enter the number of grades for student #" << i+1 <<": ";

       cin >> numOfgrades;

       double grades[numOfgrades];

       

       for (int j = 0; j < numOfgrades; j++) {

           cout<<"Enter the grade" << j+1 <<" for student #" << i+1 <<": ";

           cin >> grade;

           grades[j] = grade;

       }

       cout << "Student #" << i+1 << " got " << findLetterGrade(grades, numOfgrades) << endl;

   }

   

   return 0;

}

Explanation:

Create a function named findAverage that takes two parameters, grades array and numOfgrades

Inside the function, create a for loop that iterates through the grades and calculates the sum of the grades. Then, return the average, sum/numOfgrades

Create another function named findLetterGrade that takes two parameters, grades array and numOfgrades

Inside the function, check the average grade by calling the findAverage() function. Set the letter grade using the given ranges. For example, if the result returned from findAverage() function is between 80 and 89, set the letter to 'B'. Then, return the letter.

In the main:

Create a for loop that iterates for each student, in this case 10 students. Inside the loop:

Ask the user to enter the number of grades for student. Using this value, create a grades array.

Create another for loop (inner for loop) that will set the grades array using the values entered by the user.

When the inner loop is done, call the findLetterGrade() function passing the grades array and numOfgrades as parameter and print the result

You might be interested in
Match the feature to the network architecture,
pochemuha

Answer:

Answer is:  

Client-Server Network

  • expensive to set up
  • has a central server
  • easy to track files
  • useful for a large organization

Peer-to-peer Network

  • useful for a small organization
  • difficult to track files
  • inexpensive to set up
  • does not have a central server

Explanation:

<em>Client-Server Network is ideal for bigger network set up like offices and companies where there will be a central server involved with several clients to access and connected with the server. This is the normal network set up to companies. While, Peer to peer network is ideal for much smaller network, which consists of only two computers to communicate and share files. This network is normally temporary and inexpensive since in only works with two computers.</em>

7 0
3 years ago
Which of the following identifies a user based on anatomical characteristics such as a fingerprint, a voice print, or iris patte
antiseptic1488 [7]

Answer:

Biometrics

Explanation:

Biometrics is the techniques that is used to measure and identify different characteristic of human being that are usually unique in nature for individuals such as voice characteristics, eye retina and finger prints. These features are unique for every person. These features could be used for different purposes now a day such biometric identification, biometric verification and for forensic purposes.

There are different algorithms to compute and compare these unique characteristics for each user and store in a database for the purpose of identification of the users. This data can also be used for forensic purpose if needed by some security agency to identify some person.

The type of identification in which these features such as voice, finger prints and iris pattern use is called biometrics.

3 0
3 years ago
Who does car shows in gta 5 or what do you guys do in gta
grandymaker [24]

Answer:

google can find u some discord servers

Explanation:

4 0
3 years ago
Read 2 more answers
A typical pda includes a(n) _____.
Ratling [72]
A.External Monitor.Hope I helped.
5 0
3 years ago
Read 2 more answers
Write a raptor program that will display the count from 100 to 0 in decrements of 5.
S_A_V [24]

A raptor program that will display the count from 100 to 0 in decrements of 5 is shown below.

<h3>What is a raptor program?</h3>

This refers to a programming environment that works on a flowchart basis to help the user to present their algorithms in a visual manner.

Using a raptor program, you can display a count from 100 to 0 in decrements of 5 as shown:


#include <iostream>

#include <string>

using namespace std;

int main()

{

int count;

Count =100;

while (Count<=0)

{

cout << Count << endl;

Count =Count-5;

}

return 0;

}

The result would be a list showing numbers that go from 100 to 0 in decrements of 5.

Find out more on raptor programs at brainly.com/question/15082977

#SPJ1

3 0
1 year ago
Other questions:
  • Which of the following is not a network connection LAN WAN SAN MAN
    6·1 answer
  • A(n) ________ address is a temporary ip address assigned from an available pool of ip addresses.
    12·1 answer
  • Despite its vivid design, the website for Lolly's Bookstore did not seem to attract customers who lingered. In fact, most websit
    13·1 answer
  • Christine wants to send a quick communication to all department managers. She should send a _____. report
    13·2 answers
  • Corinne would like to click on the link at the bottom of a Web page but she only sees the top portion of the page. She should __
    6·2 answers
  • An airline company would like to easily locate lost luggage. What technology would make it easier for them to locate the luggage
    6·2 answers
  • How do you screen shot and copy paste the screenshot from chrome book
    11·2 answers
  • Write a program that reads in ten numbers and displays the number of distinct numbers and the distinct numbers separated by exac
    7·1 answer
  • A variable that can have values only in the range 0 to 65535 is a :
    5·1 answer
  • What role does the automated surface observing system.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!