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

global warming leads to rise in the water level . Do you agree ? Prove your statement
a pencil cost $(x-5) and an exercise book cost $(2x+10). If the sum of the cost of the two items is devided by 7, the result is $5.00. Calculate the cost of an
That very next morning Robert and I, sitting behind Hammond and George on their bays, went over to the patch of ground Mitchell’s family tended. Now, the Thomas
All of the ratios equivalent to 4:2
While completing a practice test online, Jalisa answered 14 out of 20 questions correctly. If the ratio of correct to total questions remains constant, how many
2y+5x=23 solve for y
HELPPPPPPPPPP PLEASEEEEEEEE!!!!!!
1=x^2 Solve for X. Y=x^2-1
HELPPPPPPPPPP PLEASEEEEEEEE!!!!!!
what similarities do you observe among the firstfive given sample? Write these common characteristic​