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);
}
}
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