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 of the objects shown above are pyramids? A. A and B B. A and D C. C only D. A only
brainliest if you are correct
Help me help Help me help Help me help Help me help Help me help Help me help
Factor 28 + 56+ + 28w to identify the equivalent expressions. 0 ht
Suppose the current level of output is 5000. If the elasticities of output with respect to capital and labor are 0.3 and 0.7, respectively, a 10% increase in ca
help gggggggggggggggggggggggggggggggggggggg
On a certain portion of an experiment, a statistical test result yielded a p-value of 0.15. What can you conclude? If the null hypothesis is true, one could ex
What is cirrhosis?describe symptoms and types of hepatitis​
Type the correct answer in the box. Spell all words correctly. Which workplace trait involves being accountable for your actions and being a dependable employe
Someone please help me