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
Post a Comment