+ 1

Please tell me how to program to add a two numbers from a user's input in java?

Adding two numbers from user's input in java

14th May 2020, 1:12 PM
Yogeshwaran
13 ответов
0
Please see this code also..and comment it... I try this code based on my question with the help of SoloLearners... I hope this code may be answer for my question shown above.... Thanks for those SoloLearners guidance......😃😃 https://code.sololearn.com/c6CWh7dG59Z4/?ref=app
15th May 2020, 5:44 AM
Yogeshwaran
+ 2
James Clark I. Vinarao I think providing complete code is not good.As if someone complete half of java course than he have such knowledge to solve this kind of problem by using the learned knowledge. And secondly he was asking for addition of two numbers by user input not by hard coded values.
14th May 2020, 1:40 PM
Muhammad Bilal
Muhammad Bilal - avatar
+ 2
Martin Taylor thanks in my next code onwards I will make sure to rectify these corrections... Any ways thanks again for your guidance .....
14th May 2020, 4:18 PM
Yogeshwaran
+ 2
You can see this tutorial I hope so you will get your answer..... https://code.sololearn.com/c4I400c9D4As/?ref=app
25th Aug 2020, 7:30 PM
Durgesh Nigam
Durgesh Nigam - avatar
+ 1
First complete your java tutorial course than you can answer your question yourself in much better way.
14th May 2020, 1:14 PM
Muhammad Bilal
Muhammad Bilal - avatar
0
My attempt please see this code and comment it.It not related to adding but related to squaring the numbers... and Thanks for your guidance...☺☺ https://code.sololearn.com/cI2i5D5gm1Wk/?ref=app
14th May 2020, 2:31 PM
Yogeshwaran
0
Thank you Martin Taylor 😊😊
15th May 2020, 4:09 AM
Yogeshwaran
0
Public class Add { Public static void main (String arts[]) Scanner s= new Scanner(System.in); System.out.println("enter a,b values:"); Int a=s.nextInt(); Int b=s.nextInt(); Int c; c=a+b; System.out.println(c);}
15th May 2020, 6:08 AM
Charith Kandula
Charith Kandula - avatar
0
Public class Add { Public static void main (String [ ] args) { Scanner s= new Scanner(System.in); System.out.println("enter a,b values:"); Int a=s.nextInt(); Int b=s.nextInt(); Int c; c=a+b; System.out.println("the sum is" + c); } }
16th May 2020, 6:08 AM
Flux gaming
Flux gaming - avatar
- 3
Don't be discouraged. Here is how: public class AddTwoNumbers { public static void main(String[] args) { int num1 = 5, num2 = 15, sum; sum = num1 + num2; System.out.println("Sum of these numbers: "+sum); } }
14th May 2020, 1:30 PM
James Clark I. Vinarao
James Clark I. Vinarao - avatar