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
blsea [12.9K]
4 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]4 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
Who invented different photo-capture methods in photography?
geniusboy [140]

Answer:

However, it wasn't until the 19th century that a breakthrough occurred. The world's earliest successful photograph was taken by French inventor Joseph Nicéphore Niépce in 1826. As such, Niépce is considered the world's first photographer and the true inventor of photography as we know it today.

Explanation:

7 0
3 years ago
A ________ attack uses software to try thousands of common words sequentially in an attempt to gain unauthorized access to a use
Andrej [43]
Malware
Hope this helps
3 0
3 years ago
A field whose data type is ____ can store text that can be used as a hyperlink address
olya-2409 [2.1K]
A field whose data type is URL address data can store text that can be used as a hyperlink address.
8 0
4 years ago
Nvm, Its B.
denis-greek [22]
B) which ice cream flavor do the most student prefer?
6 0
3 years ago
You have been using the same computer for several years. To extend its service life, you decide to upgrade the processor. You ch
Gnoma [55]

Answer:

B. Update the UEFI firmware

Explanation:

UEFI (Unified Extensible Firmware Interface) is a standard firmware interface for PCs. It is responsible for waking up the computer hardware components and ensure they are functioning properly.

The old processor was controlled by an older version of the UEFI but to run the new processor, you update the Firmware Interface to enable it communicate with the computer's hardware components.

6 0
3 years ago
Other questions:
  • A process-based DO/S must synchronize actions across the network. When a process reaches a point at which it needs service from
    6·1 answer
  • (a) Explain the difference between a web browser and a search engine.​
    15·1 answer
  • Write a program that gets a single character from the user. If the character is not a capital letter (between 'A' and 'Z'), then
    15·1 answer
  • In what order does the air flow in a canister vacuum cleaner pass through the following components?
    11·1 answer
  • This document shows a student's education and career goals and a way to achieve those goals.
    8·1 answer
  • In a cross-site request forgery, what components help send a forged HTTP request? In a cross-site request forgery, browser _____
    13·1 answer
  • Denise is using Outlook 2016 in a business environment. Her company operates a Microsoft Exchange email server.
    6·2 answers
  • Which of these is NOT an input device?
    14·1 answer
  • It is a type of web page that allows you to share your ideas experiences and beliefs
    9·1 answer
  • How do we benefit from this increased interconnectivity?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!