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
A large department store has been attaching tags with barcodes to merchandise, and employees use barcode readers to scan merchan
77julia77 [94]

The department store should consider using RFIDs (Radio Frequency Identification) for tracking inventory. Unlike the wireless barcodes, RFID uses radio waves to communicate with readers. One very common advantage of an RFID is the scanning range. Wireless barcodes, for instance, requires the reader to be close to the barcode before it can see it to scan it. However, RFID systems can scan a tag as long as it is within range. This is important because it reduces wastage of time on labor-intensive processes and increases task speed, convenience, and project turnover.

Many passive RFIDs use tags that are powered by electromagnetic energy. Such energy does not consume power.


8 0
2 years ago
Read 2 more answers
What is retrieved from a search containing two terms separated<br> by the AND operator?
egoroff_w [7]

Answer:

A AND B= 1 or 0

1 1  1

0 1  0

1 0  0

0 0 0

So, as explained above if both are 1 we then only get 1, or else we get 0 always in case of AND which is a logical operator, whose output can be 0 or 1 only. This is being depicted above.

Explanation:

If both are 1 we get 1 or always else, we get the output =0.

8 0
2 years ago
In the program below, what is the scope of strFirst?
MAXImum [283]

First, we have to understand what scope is. When variables are declared, they are only available in the code block they're declared in, unless they're global variables (this doesn't apply here).

strFirst is declared in usernameMaker and that is the only place it is available in.

5 0
1 year ago
Read 2 more answers
You can apply several different worksheet themes from which tab?
Lemur [1.5K]
<span>D. Page Layout  i hope this helps </span>
8 0
2 years ago
Read 2 more answers
_____ remove the part of an image starting from an edge​
Lapatulllka [165]
I think it’s cropping could be wrong though
4 0
2 years ago
Other questions:
  • The Spinning Jenny reduced the number of workers necessary to _______. a.remove cotton seeds from fibers b.pump water from the m
    7·1 answer
  • A(n) ______close to a cover letter leads to more interviews because you are contacting the employer. a. passive b. lengthy c. ac
    11·2 answers
  • Copy the 10 statements as they appear below into your journal.
    6·2 answers
  • Because of the density of vehicle in urban areas, you should ____.
    8·2 answers
  • Consider the following relationship involving two entities, students and classes:A student can take many classes. A class can be
    9·1 answer
  • Interpretations of​ Moore's law assert​ that:
    13·1 answer
  • A summer camp offers a morning session and an afternoon session.
    5·1 answer
  • Which of the following can you NOT apply for at any FLHSMV office? A. Certificate of title B. License plates C. Vehicle registra
    15·2 answers
  • You'd like to change the minimum password length policy in the Default Domain Policy group policy preference (GPO). What's the b
    10·1 answer
  • Given input characters for an arrowhead and arrow body, print a right-facing arrow. Ex: If the input is: *
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!