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]
3 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]3 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
3.
Viktor [21]
3. <span>for the mother to stay home to tend to the household and care for the children while the father worked to support the family

4. true (not 100% sure)</span>
5 0
2 years ago
name instances in the past where social media has kept you informed about the latest news around the country​
Luba_88 [7]
BLM movement and protests,
The election, school shootings, and the pandemic
3 0
2 years ago
Read 2 more answers
What does a bonus object do? A. Subtracts lives B. Keeps track of a player's health C. Gives a player an advantage D. Makes text
lyudmila [28]

Answer:

C) Gives a player an advantage

Explanation:

I don't know the context of the question, but it makes the most sense.

5 0
3 years ago
In three or four sentences, describe how a person buys and sells stock.
Aleksandr-060686 [28]
In order to buy stock, you must go and find a stock broker. You do not always need a broker, but it is more convenient to have one to manage your stock. It also makes your life in the market easier. The broker will manage your shares and you tell him when you want to buy or sell your stock.
4 0
3 years ago
Read 2 more answers
IF ANYONE ANSWERS YOUR QUESTION WITH SOMETHING LIKE THIS:
vova2212 [387]

Answer:Thank you very much! A user names SShalomeea has been hacking today. Anyone with that photo is a spammer.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which statement is true regarding the Quick Access toolbar?
    11·2 answers
  • In a mission critical environment, performing maintenance operations on a host FIRST requires which of the following?
    6·1 answer
  • Within the Chart Design tab, which section is used to change the data of a previously created chart?
    12·1 answer
  • Dust buildup inside a desktop PC case can be managed effectively by ____.
    7·2 answers
  • What are the features of Cobol language that make it suitable for programming business applications.
    6·1 answer
  • Name the functional arms of MSDE.
    13·1 answer
  • Gold jewellery is made when solid-gold is melted and then put into containers which are the shape of the jewellery. After this t
    9·1 answer
  • What is missing in the following program in order to have the output shown?
    15·2 answers
  • A brick has a weight of 23N. The brick is flat and smooth on the side in contact with the floor having measurements ( height= 5c
    13·1 answer
  • A common hardware component found in electronic devices including desktop computers, laptops, tablets and smartphones. The amoun
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!