what is code for adding two integers in java?, Computer Engineering

Assignment Help:

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);
   }
}


Related Discussions:- what is code for adding two integers in java?

What are the advantages of having e-commerce over extranets, What are the a...

What are the advantages of having e-commerce over extranets?     Extranets are about " joining up" the supply chain-suppliers, resellers, distributors, customers, etc.-enabling

Technology management, These five questions are part of the assignment. The...

These five questions are part of the assignment. The answers of each question can be written in around 300 words (with relevant diagrams and Refrences). Assignement should be comnp

What is the relationship between clipping and repainting, When a window is ...

When a window is repainted by the AWT painting thread, it sets the clipping regions to the area of the window that needs repainting.

Free memory space to form contiguous block of free space, The OS of a compu...

The OS of a computer might be periodically collect all the free memory space to form contiguous block of free space.  Garbage collection

Types of assemblies, How many types of assemblies are there? Private, P...

How many types of assemblies are there? Private, Public/Shared, Satellite. A private assembly is normally used by a one application, and is stored in the application's director

How to create a bugzilla account? , 1. Enter your "E-mail address...

1. Enter your "E-mail address" and "Real Name" (or whatever name you need to call yourself) in the spaces given, then select the "Create Account" button. 2. Within moments, you

Callable modules of program code within one abap/4 program, How can we crea...

How can we create callable modules of program code within one ABAP/4 program? We can create callable modules by two techniques:- By defining Macros. By creating incl

Give explanation of common channel signalling, Explain Common channel signa...

Explain Common channel signalling. Common channel signalling: Signaling systems connection the variety of transmission systems, switching systems and subscriber equipments, i

What is page frame, What is page frame? An area in the main memory that...

What is page frame? An area in the main memory that can hold single page is called as page frame.

3/11/2013 2:08:04 AM

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

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd