answer.
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
blsea [12.9K]
2 years ago
7

B. Write a function that takes one double parameter, and returns a char. The parameter represents a grade, and the char represen

ts the corresponding letter grade. If you pass in 90, the char returned will be ‘A’. If you pass in 58.67, the char returned will be an ‘F’ etc. Use the grading scheme on the syllabus for this course to decide what letter to return.
Computers and Technology
1 answer:
9966 [12]2 years ago
3 0

Answer:

#include <iostream>

#include <cstdlib>

using namespace std;

char grade(double marks){

   if(marks>=90)

   {

       return 'A';

   }

   else if (marks >=80 && marks<90)

   {

       return 'B';

   }

   

   else if (marks >=70 && marks<80)

   {

       return 'C';

   }

   

   else if (marks >=60 && marks<70)

   {

       return 'D';

   }

     else if ( marks<60)

   {

       return 'F';

   }

}

int main()

{

   double marks;

cout <<"Ener marks";

cin >>marks;

char grd=grade(marks);

cout<<"Grae is "<<grd;

return 0;

}

Explanation:

Take input from user for grades in double type variable. Write function grade that takes a parameter of type double as input. Inside grade function write if statements defining ranges for the grades. Which if statement s true for given marks it returns grade value.

In main declare a variable grd and store function returned value in it.

You might be interested in
Give the Linux bash pipelined command that would take the output of the "cat /etc/passwd" command (that lists the contents of th
exis [7]

Answer:

See attached solution

Explanation:

6 0
2 years ago
Which of the following type of online advertising intermediaries decide the placement and pricing of online display ads by using
dedylja [7]

Answer:

e. Ad exchanges

Explanation:

The ad exchange is a form of an online strategy that promotes the transaction of media advertising inventory from numerous ad networks. Here, prices for the inventory are defined through the supply and demand in a real-time auction system.

Hence, in this case, the correct answer is that the type of online advertising intermediaries is generally referred to as Ad Exchanges.

5 0
2 years ago
Which of these tools can best be used as a self assessment for career planning purposes? a personality test an asset analysis a
Ivahew [28]

Answer:

a goal development checklist

Explanation:

8 0
2 years ago
The success of Eye of the Storm exemplifies:
lyudmila [28]
A should be correct i think
6 0
2 years ago
Read 2 more answers
Ben is writing web page content on a newly launched gaming gadget. He has to use hyperlinks to help visitors navigate to web pag
GarryVolchara [31]

Answer: A. at the bottom of the web page

Explanation:

3 0
2 years ago
Other questions:
  • What are the possible consequences if you fail to identify system requirements correctly and completely?
    9·1 answer
  • Foods that are high in _________ have the least impact on slowing the body's absorption rate of alcohol.
    5·1 answer
  • You want to implement a mechanism that automates ip configuration, including ip address, subnet mask, default gateway, and dns i
    14·1 answer
  • A feedback mechanism that can be used to measure the effectiveness of a CSIRT is the ____. a. after action review b. IR plan tes
    8·1 answer
  • Create a program to deteate a program to determine whether a user-specified altitude [meters] is in the troposphere, lower strat
    11·1 answer
  • Terry came into work and turned on his computer. During the boot process, the computer shut down. When he tried again, the compu
    14·1 answer
  • Create a procedure named FindLargest that receives two parameters: a pointer to a signed doubleword array, and a count of the ar
    13·1 answer
  • If a class has member variables that are pointers, you must ensure that you implement ____.
    6·1 answer
  • Publication of flaws in encryption used for copy protection is a potential violation of: A. HIPAA B. U.S. Commerce Department re
    9·1 answer
  • Write a class named Employee that has private data members for an employee's name, ID_number, salary, and email_address. It shou
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!