//Interchange sign of a no
import java.util.Scanner;
class Pos_Neg {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter a no:");
int n=sc.nextInt();
System.out.println("New No:"+(n*(-1)));
}
}
import java.util.Scanner;
class Pos_Neg {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter a no:");
int n=sc.nextInt();
System.out.println("New No:"+(n*(-1)));
}
}
No comments:
Post a Comment