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

Video-sharing sites such as youtube and vimeo provide a place to post short videos called clips, true or false?
Since people today are living longer, a person may be able to know four generations of her ____. a. gentile b. progeny c. autonomy d. virility
Convert 8 milliliters to fluid ounces use 1 mL. = 0.034 fl oz.
a clock is constructed using a regular polygon with 60 sides. the polygon rotates every minute. how much has the polygon rotated after 7 minutes?
Which type of variable is kept the same throughout the experiment?
The exact answer and the estimated answer will always be the same. true or false
what is the answer too 3-3*6 2=?
is 3/47 a rational number
list four clues that suggest a chemical change is taking place
What is the purpose of frequency graphs?