0
When I trying to run a Java program. When this happened ( split multiple inputs into separate lines ). . what will I do to run ?
9 odpowiedzi
+ 2
On the pop-up window for input:
Give all required inputs by separating line by line ( or space separating if valid).. After hit submit button. For your code , ex:
20 (submit)
+ 1
import java.util.*;
public class Program
{
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
System.out.println("Enter a no. to guess");
int n=in.nextInt();
System.out.println("Entered no.: "+n);
int a=((int)(Math.random()*50+1));
System.out.println("Random no. from 1 to 50 range generated by ai: "+a);
if(a==n)
System.out.println(" :O You have beaten down the ai");
else
System.out.println("Try again next time ");
}
}
+ 1
Thanks man
0
Try to run
0
" This program needs an input " this is what I see when I tap the 'run'
0
I'm a beginner I don't know how to solve it
0
Can you please help