Tuesday, February 5, 2019

Java Program :

import java.util.*;

class Prog
{
  public static void main(String args[])
   {
       Scanner ob=new Scanner(System.in);

        int x,y;

       System.out.println("enter  the numbers:");
       x=ob.nextInt( );
       y=ob.nextInt( );
      int z=x+y;
      System.out.println("sum is:"+z);
    }
 }

No comments:

Post a Comment

  3.WAP IN JAVA TO INPUT THREE NUMBERS AND COUNT HOW MANY OF THEM ARE EVEN .   import java.util.*; class Prog {   public static ...