Menu Bar

Horizontal Scrollable Menu

Search This Blog

Java Addition through user input

Addition through user input value

Source code
import java.io.*;
import java.util.*;
class Add
{
public static void main(String[] args)
{
Scanner ob=new Scanner(System.in);
System.out.println("enter value of a and b");
int x,y;
x=ob.nextInt();
y=ob.nextInt();
int z=x+y;
System.out.println("sum of Z:"+z);
}
}

No comments:

ads3