wap to perform subtraction

import java.util.Scanner;
class assingment2
{
public static void main(String[] arg)
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter First Number : ");
int x=sc.nextInt();
System.out.println("Enter Second Number : ");
int y=sc.nextInt();

int z=x+~y+1;
System.out.println("Subtraction ="+z);

}
}

Comments

Popular posts from this blog

A story of friendship A tiger and a rat......become a revengable....

best pen drive