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
alex41 [277]
2 years ago
6

(a) Write a program which calculates and displays the obtained marks, percentage in six subjects and assigns grades based on per

centage obtained by a student.
i. if the percentage is above 90, assign grade A
ii. if the percentage is above 75, assign grade B+
iii. if the percentage is above 70, assign grade B
iv. if the percentage is above 65, assign grade C+
v. if the percentage is above 60, assign grade C
vi. if the percentage is above 55, assign grade D+
vii. if the percentage is less than 50, assign grade F
(Hint: using logical operators)
c++ programming
Computers and Technology
1 answer:
dangina [55]2 years ago
5 0

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

int main(){

   int scores[6];

   int sum =0;

   string grade;

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

       cin>>scores[i];

       sum+=scores[i];    }

   double percent = sum/6.0;

   if(percent > 90){        grade ="A";    }

   else if(percent>75){        grade ="B+";    }

   else if(percent>70){        grade ="B";    }

   else if(percent>65){        grade ="C+";    }

   else if(percent>60){        grade ="C";    }

   else if(percent>55){        grade ="D+";    }

   else if(percent<50){        grade ="F";    }

   cout<<grade;

   return 0;

}

Explanation:

This declares the 6 scores using an array

   int scores[6];

This initializes the sum of all scores to 0

   int sum =0;

This declares the grade as string

   string grade;

This iterates through the scores

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

This gets input for each score

       cin>>scores[i];

This adds up the scores

       sum+=scores[i];    }

This calculates the percentage

   double percent = sum/6.0;

The following if statements determine the grade

<em>    if(percent > 90){        grade ="A";    }</em>

<em>    else if(percent>75){        grade ="B+";    }</em>

<em>    else if(percent>70){        grade ="B";    }</em>

<em>    else if(percent>65){        grade ="C+";    }</em>

<em>    else if(percent>60){        grade ="C";    }</em>

<em>    else if(percent>55){        grade ="D+";    }</em>

<em>    else if(percent<50){        grade ="F";    }</em>

This prints the grade

   cout<<grade;

You might be interested in
An effective technology for e-training and e-learning is __________, which uses computer graphic displays that the user can adju
ruslelena [56]

Answer:d)Visual interactive simulation (VIS)

Explanation:Visual interactive simulation (VIS) is the technology that works in a system for its development and simulation application for making the system display dynamic.

The dynamic display is preferred because it creates the interest in clients and is also used for the e-learning purpose. It also helps in decision making in accordance with competitive process.

LOT, Flash and WebEx does not provide the  service for the e-teaching services with the dynamic display feature.Thus , the correct answer is option(d).

4 0
3 years ago
There are 4 classrooms for fifth grade and 4 classrooms for sixth grade at a school. Each classroom has 20 students. A teacher i
olga_2 [115]

Answer:

what do you want

Explanation:

there are 160 people in all if thatś what you want

5 0
2 years ago
Read 2 more answers
What does the word tolerance mean in textiles?
Firdavs [7]
It means the willingness to respect or except thecustoms, beliefs, or opinions of others
4 0
3 years ago
Felicity wants to capture the attention of the regular subway commuters in her area though her print advertisements​
mel-nik [20]

Answer: billboard

Explanation:

Plato answer

8 0
3 years ago
Nathan would like to save his PowerPoint presentation as a video that can be replayed easily on any device at full quality. Whic
valentina_108 [34]

Answer:

Presentation Quality

Explanation:

It will be full quality as it is from when your presenting

6 0
3 years ago
Other questions:
  • Which one of the following is a functional requirement? Select one: a. None of the mentioned b. Robustness c. Maintainability d.
    10·1 answer
  • Sum.Write a program that prompts the user to read two integers and displays their sum.Your program should prompt the user to rea
    11·1 answer
  • Deon is required to provide the citation information for his sources. What type of information should he collect from his source
    10·2 answers
  • What font option will elevate part of the text to a higher level and decrease its size? A. Subscript
    8·1 answer
  • Difference between entropy and enthalpy is
    9·1 answer
  • Files with what two file extensions are commonly known as tarballs??
    8·1 answer
  • Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed
    13·1 answer
  • Life Decisions Cyber Cafe is a cafe with free Internet service and computers that are linked to various online career opportunit
    15·1 answer
  • Write a program that first reads in the name of an input file, followed by two strings representing the lower and upper bounds o
    8·1 answer
  • what will happen to the contents of the destination ell if you copy the contents of the source cell into the destination cell
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!