write a java program to accept a number through parameter and print the double and square of that number
Answers
Answered by
2
import java.util.Scanner;
public class Numbers {
public static void main ( String[] args ) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int sum = 0;
int product = 1;
System.out.println("Print square of the Number");
sum = n + n;
System.out.println("Print Double of the number");
product = n * n;
}
}
Similar questions