0
My compiler i.e command prompt closes automatically as soon as it opens. What can work for me here?
I use a 32 bit dell laptop currently running windows 7.
6 Réponses
+ 1
I believe your program is executing properly. Just put a user input await at the end, so that till you enter something, program won't complete execution.
+ 1
Scanner reader = new Scanner(System.in);
int n = reader.nextInt();
use this.
it's just user input. Your program has to get delayed till you read the results.
just enter some number at the end for the program to close.
+ 1
that's because the program starts then shows output and then when it finishes it closes. to stop that you can add input this way program will keep open and close when it finds the input
0
What is a user input await?
0
Thank you Nagendra
0
nothing makes a programmer happier than solving problems. :)