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
s2008m [1.1K]
2 years ago
11

Write a program that prompts the user to enter a grade, which is aninteger in the range of 0 - 100. Using if statements, have th

eprogram output an error message of the score is too low or toohigh.
Computers and Technology
1 answer:
nika2105 [10]2 years ago
6 0

<u>C program prompts the user to enter a grade</u>

#include<stdio.h>

int main()//driver function

{

int grade;

printf("Please enter grades\n");//taking input from user

scanf("%d",&grade);

if(grade<0)/*checking whether the grade is less than zero(0)*/

printf("Error-Score is too low");

if(grade>100)/*checking whether the grade is higher than 100*/

printf("Error-Score is too high");

if(grade>=0 &&grade<=100)/*checking whether the grade is in 0-100*/

printf("you got %d ",grade);

}

<u>Output</u>

Please enter grades

103

Error-Score is too high

Please enter grades

77

you got 77

Please enter grades

-3

Error-Score is too low

You might be interested in
How do you know when a spreadsheet object is active in a powerpoint presentation?
Ira Lisetskai [31]
It should be under lined, when you press it it should have a different colour
4 0
3 years ago
In a _____ network, each device on the network is attached to a central router. If the router fails, then the other devices will
Damm [24]

Answer:

In a STAR TOPOLOGY network, each device on the network is attached to a central router. If the router fails, then the other devices will be unable to communicate, but if only one connected device fails, then all other devices will still be able to communicate.

Explanation:

In this type of topology all the computers are connected to a single router through a cable. This router is the central node and all others nodes are connected to the central node.

7 0
2 years ago
One should take to prevent ulcers in the gastrointestinal tract?​
Andrew [12]

Answer:

food??

Explanation:

if you don't eat food, the acid produced in the stomach will break down the stomach walls instead of the food, giving you ulcers

7 0
2 years ago
How is an orthographic drawing similar or different from an isometric drawing
Savatey [412]
An Isometric drawing<span> is a quasi 3d </span>drawing<span> that shows the height width and depth of the object in a single view where the viewpoint is at a 45 degree angle from each of the perpendicular planes of the </span>orthographic<span> view. </span>Isometric<span> differs from a perspective view in that all lengths are shown true length.</span>
6 0
3 years ago
Java initializes all variables with the default values of its data type . *
ahrayia [7]

Answer:

This is correct.

Explanation:

int is initialized with 0

object references with null

etc.

8 0
3 years ago
Other questions:
  • Ann wants to download Adobe Acrobat software from the Internet. Prior to downloading, a standardized online contract appears on
    7·1 answer
  • If you purchase a software suite for personal use, you can install the software how many times on how many different machines?
    6·1 answer
  • How many apostrophes or quotation marks in a row should you use to begin and end a multi-line string?
    14·2 answers
  • Assume that a 5 element array of type string named boroughs has been declared and initialized. Write the code necessary to switc
    5·1 answer
  • In Access, it is possible to have _______________ fields, that is, fields that can contain more than one value.
    9·1 answer
  • Melanie needs to ensure that readers are able to locate specific sections within a document easily. What should she include in
    8·1 answer
  • All of the following are helpful test taking strategies EXCEPT_______________.
    5·2 answers
  • The analogy of a computer system is often used to illustrate the different parts of memory. The keyboard is where we encode new
    8·1 answer
  • Kenny FRIEND ME. Ps that is my brother
    9·2 answers
  • What is technology?5points​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!