Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to give square in java

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));
        
    }
} 
Comment

PREVIOUS NEXT
Code Example
Java :: java collection interface 
Java :: java class jar determine 
Java :: how to change tablayout current view position in android 
Java :: BufferredReader Class 
Java :: hexstring to string In java 
Java :: center textview programmatically android 
Java :: change size of array java 
Java :: java map string to list 
Java :: jtable font size 
Java :: Java program to print decimal to octal conversion 
Java :: java list to array 
Java :: set view size android 
Java :: java first character string number 
Java :: java android development get element by id 
Java :: first and last digit of a number in java 
Java :: switch case enum java 
Java :: integer palindrome in java 
Java :: tostring in java 
Java :: the main of java 
Java :: bubble sort in java 
Java :: java filter array by even numbers 
Java :: java string from byte array 
Java :: filter and map multiple fields from java stream 
Java :: thread java timer 
Java :: java all characters in alphabet order simpler 
Java :: swiperefreshlayout 
Java :: insert data from database sqlite android 
Java :: Spigot coding how to send a message to player after commadn 
Java :: reading string after double in java 
Java :: cant change button color when app run android studio 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =