Hey there! We receieved your request
Stay Tuned as we are going to contact you within 1 Hour
One of our academic counsellors will contact you within 1 working day.
Click to Chat
1800-5470-145
+91 7353221155
Use Coupon: CART20 and get 20% off on all online Study Material
Complete Your Registration (Step 2 of 2 )
Sit and relax as our customer representative will contact you within 1 business day
OTP to be sent to Change
hey its very simple
you need to use the + operator for adding nos in java
ex,
int a=9;
int b=1;
int s=a+b;
System.out.println(s);
the output will be 10
say thanks to qwertykey;for more help reply me on askiitians forum
a = 5;
b = 10;
c = a + b;
System.out.println("The sum is " + c);
import java.util.Scanner; class AddNumbers{ public static void main(String args[]) { int x, y, z; System.out.println("Enter two integers to calculate their sum "); Scanner in = new Scanner(System.in); x = in.nextInt(); y = in.nextInt(); z = x + y; System.out.println("Sum of entered integers = "+z); }}
Register Yourself for a FREE Demo Class by Top IITians & Medical Experts Today !