+ 2
How to get three inputs in one statement.
a,b,c=
12 Answers
+ 11
//u can use array for that đđđ
Scanner sc=new Scanner (System.in);
int numbers []=new int [3];
for (int x=0;x<3;x++)
numbers [x]=sc.nextInt ();
//while input these three numbers , leave some space between them
//hope it helpsâș (java)
+ 10
Please elaborate what exactly you want to do? đŒ
+ 10
How about something like this?
user_input = raw_input("Enter three numbers separated by commas: ")
input_list = user_input.split(',')
numbers = [float(x.strip()) for x in input_list]
Or, This might prove useful too:
a,b=map(int,raw_input().split())
You can then use 'a' and 'b' separately.
Source: Stackoverflow.com
+ 4
int a = 10, b = 20, c = 30; Like that?
+ 3
well that was in java
+ 2
I want three inputs a=,b=,c=
in single statement which means a,b,c=
+ 2
three different inputs in single statement
+ 2
I will work
+ 2
it will work??????
+ 2
I want in python
+ 2
and I want to get input from the user
+ 2
a, b, c = input().split(',')