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
Viktor [21]
3 years ago
10

Consider the following table used for grading assignments.

Computers and Technology
1 answer:
xxTIMURxx [149]3 years ago
7 0

Answer:

We can use if-else statements to implement the given problem.

C++ Code:

#include <iostream>

using namespace std;

int main()

{

   int marks;

   cout<<"Enter the marks"<<endl;

   cin>>marks;

  if (marks>=90 && marks<=100)

  {

cout<<"Grade: A"<<endl;

  }

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

{

cout<<"Grade: B"<<endl;

}

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

{

cout<<"Grade: C"<<endl;

}

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

{

cout<<"Grade: D"<<endl;

}

else if (marks>=0 && marks<=59 )

{

cout<<"Grade: F"<<endl;

}

else

{

cout<<"Invalid marks!"<<endl;

}

   return 0;

}

Test results:

Enter the marks

100

Grade: A

Enter the marks

90

Grade: A

Enter the marks

89

Grade: B

Enter the marks

80

Grade: B

Enter the marks

79

Grade: C

Enter the marks

70

Grade: C

Enter the marks

69

Grade: D

Enter the marks

60

Grade: D

Enter the marks

59

Grade: F

Enter the marks

45

Grade: F

Enter the marks

105

Invalid marks!

Enter the marks

-6

Invalid marks!

Hence all the cases are working fine!

You might be interested in
Complete the sentences describing a computer innovation.
dolphi86 [110]

Answer:

Collaboration

4 0
3 years ago
Suppose that a laptop identifies its processor as follows: AMD’s A84500M. What does the AMD represent?
zalisa [80]

Answer:

Advanced Micro Devices

Explanation:

4 0
3 years ago
Mark used the Cover Page gallery in Word to insert a cover page in his report but now he wants to delete it. To do so, he should
Minchanka [31]

Answer:Remove Current Cover Page

Explanation:

Remove Current Cover Page  is the option that is particular for removing or deleting the present cover page from the Word. It can be removed if another cover page is required to put up or cover page is mistakenly inserted.

  • This option is present in Insert tab.It contains Cover Pages in Pages Group to vanish current cover page
  • According to the question,Mark should use Remove Current Cover Page  option from Pages group to eliminate the cover page that he does not want anymore in his report.  
5 0
3 years ago
What is the name of a variable that does not change values?
denpristay [2]

Answer:

Constant variable

Explanation:

Constant variable is a data item whose value cannot change

5 0
2 years ago
Read 2 more answers
Which of the following can you do under the fair use exceptions?
anzhelika [568]
What fair use exceptions are you talking about? There are thousands on fair use exceptions.
8 0
3 years ago
Other questions:
  • How do you change between worksheets inside an excel workbook?
    13·2 answers
  • You are the systems administrator for a scientific research company that employs over 100 scientists who write and run Linux pro
    13·1 answer
  • Someone plzzzzz help me!!!
    6·1 answer
  • A pizza delivery restaurant decides to stop hiring drivers and start hiring cyclers to deliver its pizza. The restaurant thinks
    15·1 answer
  • Is this a desktop or a computer, or are they the same thing
    12·1 answer
  • 1. Write the full forms of the following.
    5·2 answers
  • Which validation method would you use for first name on a data form
    15·1 answer
  • I need help pleaseeeeeee!
    10·2 answers
  • Location of a video or photoshoot is not important when it comes to preplanning the shoot
    15·1 answer
  • What would the theoretical variance (square of the standard deviation) of the following random values be? rand(Normal(80, 10), 2
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!