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

Which 2 numbers are greater than 3/5 1/4 , 0.68 , 2/3 , 0.599 , 1/2
Ramona told Edward that she was pregnant by him and wanted him to marry her. He did so, relying on her statement. Later, she learned that she was not pregnant w
i need help badly emergency!!
PLEASE HELP, I RLLY NEED THIS TO SAVE MY GRADE. PLS EXPLAIN RLLY DETAILED. In this discussion, you will upload and discuss an example of the Fibonacci sequence
A tariff is a type of what??
EFFECTS OF ANTHROPOCENTRIC MODEL
the power of the federal government are
Two experimental runs are performed to determine the calorimetric properties of an alcohol that has a melting point of -10°C. In the first run, a 200-g cube of
(3x+2)(4x-5) foil method
Which of the following is NOT a conjugate acid-base pair? Which of the following is NOT a conjugate acid-base pair? a.H2SO3/HSO3b.NH4+NH3 c.C2H3O2d.HC2H3O2 H3O+