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 was the original reason for the british to begin enforcing taxes in the colonies
4w2 – 6w3 – 5 in standard form
Citizens of _____ are citizens of all the nations in the alliance. NAFTA OAU EU ASEAN
what is one theory about how early people migrated from asia in the american
What's the difference between equiangular and equilateral triangle?
Exercise increases the release of this hormone, which is responsible for feelings of happiness and well-being. A. Eustress B. Endorphins C. Melatonin D. Progest
what is the best programming language?
give one advantage of using enzymes in industrial manufacturing processes
What two supreme court justices were appointed by ronald reagan? david souter stephen breyer anthony kennedy antonin scalia?
The positions available in the health and wellness industry __________. A. are only relevant for extroverted people B. can meet the career needs of many differe