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

Please help with this question..
Determine the intercepts of the line. Don’t round answers. -6x+3y=-7
Lymphadenitis affect on body systems
The Greatest Real Estate Deal in History? The reader can conclude that Jefferson did not want to wait to get permission to buy the Louisiana Territory because
what is cristiano ronaldo biggest fantasy​
Mention 3 ways in which man-made damage to the lithosphere can be done and briefly explain how they can be prevented.
After reading “Bridge to Terebithia” what did you enjoy most
give me a 400 word story​
3z +9y = 7 3z +9y=10
In your brand guide, you will also plan how you will take action, in three ways: your first impressions, listening style, and nonverbal communication. in the fi