+ 1

How do i get the input of a number to multiply it

I need to take the input from the user to write a else if code how do I do it

31st May 2018, 12:46 PM
Morpheus
Morpheus - avatar
8 Respuestas
+ 8
Python: a = int(input()) if a != 0: //do something else: //do something
31st May 2018, 1:05 PM
A Fox
A Fox - avatar
+ 5
mention which programming language you refer here.. every language has unique input code.. Morpheus
31st May 2018, 12:52 PM
Scooby
Scooby - avatar
+ 4
Here an example in JS. var a = prompt("Enter a number"); if (a==5) { //do something } else { //do something }
31st May 2018, 1:00 PM
Warith Vatanaplachaigoon
Warith Vatanaplachaigoon - avatar
+ 4
Here an example in Python. a = int(input("Enter a number")) if a==5 : #do something else : #do something
31st May 2018, 1:05 PM
Warith Vatanaplachaigoon
Warith Vatanaplachaigoon - avatar
+ 2
Thank you all. Now I can make a good program . thanks a lot
31st May 2018, 3:52 PM
Morpheus
Morpheus - avatar
+ 1
Tell me plz
31st May 2018, 12:46 PM
Morpheus
Morpheus - avatar
+ 1
sry about that . I am mentioning phyton
31st May 2018, 12:58 PM
Morpheus
Morpheus - avatar