Further processing, like i've my algorithm to input the number of answers(For now working on integers) to a robot and to save them for further processing. Related to AI
Type: Posts; User: Mr.777
Further processing, like i've my algorithm to input the number of answers(For now working on integers) to a robot and to save them for further processing. Related to AI
Depends upon the scenarios. If it's the writing speed, for sure no user can. But if it's learning speed, computer can't (Again depends if an algorithm is specified for a computer to do so). Well this...
You sound logical. Coz all it depends upon the user. Thanks for your feed back and help.
No, i ain't idiot :)
That didn't work too. I actually want it to get input as far as there is no Enter pressed. Well i managed to get it working.....
int val=0;
int arr[]=new int [5];...
while((val=System.in.read())==' '){
//here
}
If i am not wrong, it's an empty character. Damn :@
Norm, thanks, i got it. I must get space ASCII :P How idiot i am :P
It doesn't even get inside the loop :) I don't know why.
Also, if i do
int val=0;
try{
val=System.in.read();
}catch(Exception e){
System.out.err(e.getStackTrace());
}
The problem is i can not get data inside array. Array still prints 0 as it's not even assigned any value. I know this will read character as it prints me ASCII but i somehow unable to manage to move...
Yes, and that is
int val;
int [] arr= new int[5];
int i=0;
while((val=System.in.read())==' '){
arr[i]=val;
i++;
}
Ofcourse Fastest execution time. I don't care for lines of code actually.
1 2 3 (Enter)
This is how data will be entered.
And i am doing exactly like this but the problem is i want to know the most efficient way of getting input like this. Do you know any?
Okay, may be there is nothing what i think of achieving in it. Thanks for the time Norm.
Sorry Norm, i know i am not able to explain what i need. Let me try once more... uhh......huh
What i need is, the most efficient way of getting 'N' times input separated by a space between each...
Yes, user will enter through Keyboard.
I don't want to read String everytime. What if i need to read integer values separated by a space each, 'N' times. I am looking for efficient method to read Integers separated by space 'N' times.
Let's assume, i will start my program and get a number from user say 'N'
And no, input record can not contain more than 'N' values. All values will be space separated. I've managed to do this by...
Can anyone give me idea of getting input 'N' number of times with a space difference between every input.
Forexample:
1 2 3 4 . . .
Note: We don't know the 'N' initially and i want to get input...