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
Create a function named first_a that uses a list comprehension. The function will take a single integer parameter n. Find every
aivan3 [116]

Answer:

def first_a(n):

   lst1 =[x for x in range(1,n+1)if x%6==0 or x%11 ==0]

   print(lst1)

Explanation:

Above is a function in python programming language. We have used list comprehension to check numbers that are multiples of 6 or 11 in a range.

When this function is called it will receive an argument (n) of type integer, a range will then be generated from 1 to n+1 since n is inclusive. The modulo operator is used to determine is a value is a multiple of 6 or 11, since their multiples will evaluate to 0

3 0
3 years ago
There is a flashing yellow light at the intersection you are approaching. What does the flashing yellow light indicate, and what
Ilia_Sergeevich [38]
The flashing yellow light indicates that people should be aware of other cars and turn carefully. To be more safe, you should slightly slow down, make sure all signals that should be on are on, and you should drive very carefully.
6 0
3 years ago
7. Question
Zigmanuir [339]
All server side errors start with 5XX
8 0
3 years ago
Ross has to create a presentation for his class but can't decide on a topic. What should he do?
mylen [45]
Resheach thngs that instrest him and that fit the guidlines
6 0
3 years ago
Read 2 more answers
Some scientists say that robots my become self - aware in the near future Do you think this is possible?​
galben [10]

Answer:

i believe that robots could become self aware because its called artificial intelligence, and that means that they can pretty much think for themselves

Explanation:

its just my opinion but i hope i helped!

6 0
2 years ago
Other questions:
  • Write a program that accepts as input the mass, in grams, and density, in grams per cubic centimeters, and outputs the volume of
    14·1 answer
  • Using the bitwise AND operation, the result of 1 AND 0 is ___________. 10100100 ___________ 11010101 = 01110001. A common way to
    15·1 answer
  • One of the major advantages of digital photography is the ability to see the shot as soon as you take it.
    13·1 answer
  • Convert to octal. Convert to hexadecimal. Then convert both of your answers todecimal, and verify that they are the same.(a) 111
    12·1 answer
  • Which of the following Office Online apps is most effective for creating multi-media presentations
    15·1 answer
  • You wrote a C application that takes 20 seconds using your desktop processor. An improved C compiler is released that requires o
    6·1 answer
  • 1. Extract title Write a function extract_title that takes one parameter, the filename of a GenBank formatted file, and returns
    14·1 answer
  • Please answer the following essay question:
    13·1 answer
  • Describe two types of storage devices?​
    15·1 answer
  • What's the difference between cross-site scripting and cross-site request forgery? How do you protect against cross-site request
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!