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?

One can use the event get in a report without ldb attribute, One can use th...

One can use the event GET in a report without LDB attribute. False. no one can use the event GET in a report without attribute.

The method(s) of payment for online consumers, The method(s) of payment for...

The method(s) of payment for online consumers are A) Electronic cash    (B) Credit/debit C) Electronic checks

The types of parameters in the function modules, What are the types of para...

What are the types of parameters in the function modules? In general, function module can have four types of parameters: EXPORTING : for passing data to the called function

Applications of linked list, What are the Applications of Linked List are ...

What are the Applications of Linked List are a) Fixed block storage allocation b) garbage collection

Visual basic applications in general context, Describe some general uses fo...

Describe some general uses for Visual basic applications in general context? Ans) Visual basic can be used within almost all Microsoft products such as Map point, Visio, Auto ca

What will be the output of JK flipflop for J = 0 and K=1, For JK flipflop J...

For JK flipflop J = 0, K=1, the output after clock pulse will be ? Ans. J=0 and K=1, such inputs will reset the flip-flop, after the clock pulse. Therefore whatever be the earlie

How can we create an outline around text, Place some text wherever. Then cl...

Place some text wherever. Then click "Create path from text" in the "Text tool option" window. Then use "Edit" -> "Stroke path" and choose the appropriate options in the following

Explain tri-state logic inverter, Explain Tri-state logic inverter with the...

Explain Tri-state logic inverter with the help of a circuit diagram. Give its Truth Table. Ans: Tri-state Logic Inverter: The functional diagram of Tri-state Logic Inve

Illustrate about the single inheritance, Illustrate about the single inheri...

Illustrate about the single inheritance During inheritance, superclass feature may by override by a subclass defining that feature with the same name. The overriding features (

Write a menu driven program to find 10''s complement, Q. Write a menu dri...

Q. Write a menu driven program to find 9's and 10's complement of a decimal number using file. Perform necessary validation with proper message that entered numbers must be de

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