+ 1
Why my code is not running
import java.util.Scanner ; class addition { public static void main(String args[]) {int a,b,c,d; Scanner sc=new Scanner(System .in); a=sc.nextInt(); b=sc.nextInt(); c=sc.nextInt(); d=a+b+c; System .out.println(d); } }
5 Antworten
+ 4
Code is running just enter inputs like this
2
3
4
Then press enter
+ 2
Thank you so much, Mr AJ
I am new to phone ide!
It worked!! .....
+ 2
Demoff Pls avoid giving finished code as answer, because it makes the OP skip the most important part of learning. Always prefer giving hints for the OP to find the solution.
+ 1
Mr Emerson Perdo
Yeah bro i pay heed to it!
Thank you so much
0
Shubham Swaraj 161 Get used to read the outputs. They are the most helpful info you can get on a problem. "Is not running" can mean anything, but "I got error xyz" points you to the right direction.
Also, use the Code Playground to share code. You just need to save the code as public, then use "+" button to link it in your question description. This makes it easier for those willing to test and debug, and avoids copying errors.