write a program to find the square of a number using java.io
Answers
Answered by
2
import java.util.*;
public class Square
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int num;
System.out.print("Enter an integer number: ");
num=sc.nextInt();
System.out.println("Square of "+ num + " is: "+ Math.pow(num, 2));
}
Answered by
1
Answer:
♥️♠️ RAM RAM JII ♥️♠️
Program:
import java.io.*;
public class Square
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int num;
System.out.print("Enter an integer number: ");
num=sc.nextInt();
System.out.println("Square of "+ num + " is: "+ Math.pow(num, 2));
}
}
Explanation:
hope it's help you‼️‼️☑️☑️
♠️♥️ Thank you ♥️♠️
Similar questions