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?

Dram simm, The most common type of non-volatile memory is the ROM device. T...

The most common type of non-volatile memory is the ROM device. This device is read only and the data is masked into the chip during manufacture. Variations of the ROM are one off p

Incorporating javascript into a web page, As we already know, HTML (Hyperte...

As we already know, HTML (Hypertext Markup Language) is the language we use to create Web documents. Now we will read "Hello World!" As given below:

What is hyper-threading, Hyper-threading officially known as Hyper-threadin...

Hyper-threading officially known as Hyper-threading Technology (HTT) is Intel's trademark for their functioning of simultaneous multithreading technology on Pentium 4 micro-archite

Techno hype - obstacle to information system, Techno hype - Obstacle to Inf...

Techno hype - Obstacle to Information System New technology has always been accompanied by a certain amount of euphoria that inevitably leads to unrealistic expectations place

Determine the odd parity bit for f, Q. Determine the odd parity bit for F. ...

Q. Determine the odd parity bit for F. Q. Convert the following from binary to decimal, hexadecimal, BCD and octal. a) 1000000011   b) 0001010110101  c) 1 Q. Convert the f

What is write-back or copy-back protocol, What is write-back or copy-back p...

What is write-back or copy-back protocol? For a write operation using this protocol during write-hit: the method is to update only the cache and to mark it as updated with an a

What are the different layers in r/3 system, What are the different layers ...

What are the different layers in R/3 system? There are three layer:- Presentation Layer. Application Layer. Database Layer.

What are the features of prom, What are the features of PROM? They are ...

What are the features of PROM? They are programmed directly by the user. Faster Less expensive More Flexible

What is data structure, What is data structure? A data structure is a w...

What is data structure? A data structure is a way of organizing data that considers not only the items kept, but also their relationship to each other. Advance knowledge abo

Steps uesd in quine mckluskey method, Q. Steps uesd in quine mckluskey meth...

Q. Steps uesd in quine mckluskey method? Step I: Build a table in that every term of expression is represented in row (Expression must be in SOP form). Terms can be expres

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