Computer Science, asked by aditichauhan69, 1 year ago

write a program in Java to input the Sum of two numbers....

Answers

Answered by faik79
4
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 the integers = " + z);

   }

}


faik79: it's fine .. i knew there is something wrong
faik79: u chatted with me because u hav dare
faik79: koi ni .. mine bola to its fin ...
faik79: u dnt hav to worry
Similar questions