Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java code for square

int square = Math. pow(i, 3);
Comment

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 :: restart java windows 
Java :: java collection interface 
Java :: java print stack 
Java :: deserialize date java 
Java :: android maven dependency 
Java :: how to scan as a letter in java 
Java :: HUFFMAN CODING IN JAVA 
Java :: Java Sorting Using sort() 
Java :: set view layout params android 
Java :: maven artifact 
Java :: while loop in java 
Java :: java check if path exists 
Java :: assert log in unit testing 
Java :: java foreach backwards 
Java :: read wss endpoint java 
Java :: java if statement 
Java :: java program for try catch finally 
Java :: design custom button in android 
Java :: java arraylist add 
Java :: multiple condition inside for loop java 
Java :: jdk 15 download brew 
Java :: java map create with values 
Java :: reverse java 
Java :: how to check if a person presses a button in jframe in java 
Java :: Loop in singly linked list 
Java :: window in java swing 
Java :: how to create set java 
Java :: write in file java 
Java :: pass array to method java 
Java :: java method overriding 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =