The Addition of two number in Java
import java.util.Scanner;
class AddNumbers
{
public static void main(String args[])
{
int a, b, c;
System.out.println("Enter two Numbers ");
Scanner in = new Scanner(System.in);
a = in.nextInt();
b = in.nextInt();
c = a + b;
System.out.println("Sum of entered integers = "+c);
}
}
import java.util.Scanner;
class AddNumbers
{
public static void main(String args[])
{
int a, b, c;
System.out.println("Enter two Numbers ");
Scanner in = new Scanner(System.in);
a = in.nextInt();
b = in.nextInt();
c = a + b;
System.out.println("Sum of entered integers = "+c);
}
}
Comments
Post a Comment