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?

Algebraic method for simplification of boolean expressions, Define Algebrai...

Define Algebraic method for Simplification of the Boolean Expressions This method is depend on the by knowledge of the Boolean algebra. Expression can be making simpler by usin

What is direct addressing mode, Computer Organization and Architecture ...

Computer Organization and Architecture 1. Draw the block diagram of von Neumann Architecture and describe about its parts in brief. 2. Draw block diagram of Intel 8085 CPU o

What is a program counter, It is a 16 bit special function register in the ...

It is a 16 bit special function register in the 8085 microprocessor. It remains track of the next memory address of the instruction that is to be implemented once the implementatio

What is meant by context switch, What is meant by context switch?  Swit...

What is meant by context switch?  Switching the CPU to another process requires saving the state of the old process and loading the saved state for the new process. This task i

Define the translator which perform macro expansion, Define the translator ...

Define the translator which perform macro expansion is known as a                      Macro pre-processor is the translator which perform macro expansion

How to set a read or write watch point for a variable, By using Rwatch, Awa...

By using Rwatch, Awatch command in GDB we can set read or write watchpoint for a variable.

Why select clause comes after from clause in linq, The reason is, LINQ is u...

The reason is, LINQ is used with C# or other programming languages, which needs all the variables to be declared first. From clause of LINQ query just describes the range or condit

Programming , Adavantages and disadvantages of compilers and interpreters

Adavantages and disadvantages of compilers and interpreters

What do you mean by complexity of an algorithm, What do you mean by complex...

What do you mean by complexity of an algorithm? The term complexity is used to define the performance of an algorithm. Typically performance is calculated in terms of time or s

How to use activex control in .net, How to use ActiveX Control in .Net ? ...

How to use ActiveX Control in .Net ? ActiveX control is a special type of COM component that handles a User Interface. Using ActiveX Control in your .Net Project is even simple

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