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 complex number has a distance of √ 17 from the origin on the complex plane? 2 + 15i 17 + i 20 – 3i 4 – i
Point C has the coordinates (–1, 4) and point D has the coordinates (2, 0). What is the distance between points C and D? d = StartRoot (x 2 minus x 1) squared +
Helppp! Who knows how to do this??
Which of the following is the portion of a line that starts at one point and goes off in a particular direction to infinity? Angle Circle Ray Vertex
A humorous narrator could be described as which of the following​
Need help ASAP will mark brainliest
Orange trees reproduce through sexual reproduction. What can be known about orange tree reproduction?
Driving a vehicle in reverse gear with an obstructed rear view. Is this a safe or unsafe practice? Safe Unsafe
Please, help me. How is it.
What is the job title of someone who works with video and/or film?