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

what is a computer security risk?
Who were ronald reagan and franklin d.Roosevelt and what viewpoint did they share about the president term office
What interest rate per annum is a fund paying its clients if the third to the last payment of a depositor became Php 1,040.40 from an initial savings payment of
Unscramble these,I cant figure it out. Their all foods
what is the justification for each step in the solution 4(-6x-3) + 24 = -72x + 132
I need help with this
Experts believe that most Native Americans died of diseases like smallpox, typhoid, or diphtheria in the first decades of contact with European settlers. Which
if a1 = 8 and an =an-1-3 then find the value of a5
π÷½ please help me on this question
A balloon is floating freely at a rate of 0.87 m/s due south. A southerly breeze (coming from the south) blows against the balloon with a velocity of 0.32 m/s.