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
How are switches indirectly involved in ARP poisoning?
11Alexandr11 [23.1K]

Answer:

They

are indirectly involved in the attack because they do not verify the the MAC/IP address

association

Explanation:

PLEASE MARK ME AS BRAINLIEST

8 0
3 years ago
Write a program that prompts the user for two numbers then outputs the result of dividing the first number by the second number
Rainbow [258]

The program is

num = int(input("Enter Numerator "))

den = int(input("Enter Denominator "))

print("quotient is ",str(num//den)," remainder is ", str(num%den))

<h3>How to create a division sign in HTML?</h3>

To create a division sign ( ÷ ) in HTML you can use any of the following codes.

&divide;

&div;

&#247;

<h3>How to divide in computer programming?</h3>

Perl code

use strict;

my $first = 15;

my $second = 5;

my $answer = $first / $second;

print "You get $answer if you divide $first by $second";

When the script above is run, it displays "You get 3 if you divide 15 by 5" on the screen.

To learn more about programming, refer

https://brainly.ph/question/4743

#SPJ4

5 0
1 year ago
WIN
Delicious77 [7]
The correct answer is D
6 0
3 years ago
Read 2 more answers
(asking again because point-hogs exist)
yawa3891 [41]

The answer is 2-to-the-power-of-n, since for every input, the number of different combinations doubles. From your list I think answer A is meant to indicate 2ⁿ.

6 0
3 years ago
Write code to assign the number of characters in the string rv to a variable num_chars.
kramer

Answer:

rv = "hello"

num_chars = len(rv)

print(num_chars)

Explanation:

*The code is in Python.

Initialize the string rv, in this example I set it to "hello"

Use the len() method to get the number of characters in the rv and set it to the num_chars

Print the num_chars

Note that the result will be 5 in this case, because <em>hello</em> consists of five characters

6 0
3 years ago
Other questions:
  • You can use predesigned, formatted files called _____ to create new worksheets quickly.
    13·1 answer
  • Why is a DNS cache poisoning attack dangerous? Check all that apply. A. Errrr...it's not actually dangerous. B. It allows an att
    12·1 answer
  • What are 7 key traits for knowing your audience
    6·2 answers
  • The operating cost of driving include
    11·1 answer
  • Can someone help please
    12·1 answer
  • What is the python print of (“5”+”7”)?
    10·1 answer
  • What are some of these new iPad extras? One is the iMarker. Crayola teamed up with another company to make it. It costs $29.99.
    8·1 answer
  • Write a program named RectangleArea to calculate the area of a rectangle with a length of 15.8 and a width of 7.9. The program s
    10·1 answer
  • write a function that takes two integer arrays as input return true if any two of the numbers in the first array input add up to
    10·1 answer
  • Explica la importancia que tiene el plan de trabajo (cronograma) en los proyectos y porque se realiza antes de ejecutar la soluc
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!