quecy77quev quecy77quev
  • 04-08-2021
  • Computers and Technology
contestada

write a C++ program that receives a number as input from the user ,and checks whether it is greater than 8 and less than 10 or not and print the result
​

Respuesta :

khoa18050
khoa18050 khoa18050
  • 05-08-2021

num_in = float (input = ("Please enter a number from 0 to ten: "))

def cmp_num(num_in):

try:

if num_in > 8 and num_in < 10:

print ("{0} is greater than 8 and less than 10".format(num_in) )

elif num_in < 8 and num_in < 10:

print (" {0} is less than 8 and less than 10".format(num_in) )

else:

print ("{0} is out of the restriction".format (num_in))

except ValueError:

print ("Invalid input")

Answer Link

Otras preguntas

who is the first people in earth?​
Read this passage from the article: The debate over renaming schools that honor people with stories related to racism continues to provoke divisions. Such argum
what army did the red army face
Plzzz help I only have 20 minutes
total height of a class 1300 centimeters is the average height of a Class of 65 cm find the number of students in the class​
Which describes the United States after the American Civil War? A) a united nation with slavery only in the South B) a united nation with no slavery C) two nati
air pollution causes acid rain how?​
help me write this ?
The graphs below have the same shape what is the equation of the blue graph
Solve 2x + 5y = -13 3x - 4y = -8 (4,1) (-4,1) (4.-1) (-4,-1)