Write a program to find the square of the number 4

Number of replies: 32
In reply to First post

Re: Write a program to find the square of the number 4

by Fahim Sultan(201-15-3416) -

package javaapplication1;


public class SquareOf4 {

    

    public static void main(String[] args) {

        

      

       int k = 4;

        

        int sq = (int) Math.pow(k, 2);

        

        System.out.println("The Square Value of 4 is : "+sq);

        

    }

    

}

In reply to First post

Re: Write a program to find the square of the number 4

by Md. Alif Sheakh -

public class pp2 {
public static void main(String[] args) {
byte num = 4, square;
//square = (byte) (num*num); or,
square = (byte) Math.pow(num,2);
System.out.println("The Square of the number 4 is = " +square);
}
}

In reply to First post

Re: Write a program to find the square of the number 4

by Reajul Islam Nizhum -

public class square_of_4{

public static void main(String[] args)
{
byte num = 4, square;
square = (byte) Math.pow(num,2);
System.out.println("\nThe Square of the number 4 is =" +square);
}
}

In reply to First post

Re: Write a program to find the square of the number 4

by Mst.Fatematuz Zohura(201-15-3195) -
public class square {

public static void main(String[] args) {

int n = 4;
int square = (int) Math.pow(n, 2);
System.out.println("The Square Value of 4 is : "+square);

}

}
In reply to First post

Re: Write a program to find the square of the number 4

by Md. Jahidul Islam (201-15-3368) -
public class square 4{

public static void main(String[] args)
{
byte number = 4, square;
square = (byte) Math.pow(num,2);
System.out.println("The Square of the number 4 is =" +square);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Pritom Basak (201-15-3342) -
package executionsteps;


public class Square4 {
public static void main(String[] args){
int number=4,Sq;
Sq=(int) Math.pow(number,2);
System.out.println("Square of 4=" +Sq);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Shakil Hossen Shawon (201-15-3562) -
public class square {

public static void main(String[] args) {

int n = 4;
int square = (int) Math.pow(n, 2);
System.out.println("The Square Value of 4 is : "+square);

}

}
In reply to First post

Re: Write a program to find the square of the number 4

by MD. ASLAMUZZAMAN BAPPY (201-15-3228) -
public class oop_2 {
public static void main(String[] args) {
byte num = 4, square;
//square = (byte) (num*num); or,
square = (byte) Math.pow(num,2);
System.out.println("The Square of the number 4 is = " +square);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Sadia Sultana Chowa ( 201-15-3052 ) -
package square;

public class squareof4 {

public static void main(String[] args) {
// TODO Auto-generated method stub
int a = 4;
System.out.println("The square of 4 is : " + a*a);
}

}
In reply to First post

Re: Write a program to find the square of the number 4

by Rahad Islam (201-15-3623) -
import java.util.Scanner;
public class squareNumber {

public static void main(String[] args) {
System.out.print("Number:");
Scanner number=new Scanner(System.in);
float N=number.nextFloat();
float squre=N*N;
System.out.println(squre);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Abdullah Fahim(201-15-3201) -
public class Practice {

public static void main(String[] args) {
int a=4, result;
result = 4*4;
System.out.println("The square of the number 4 is "+result);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Risul Islam Jim (201-15-3675) -
public class FindSquare {

public static void main(String[] args) {
int num = 4, square;{
square = (num*num);

System.out.println("The Square of the number 4 is = " +square);

}

}
}
In reply to First post

Re: Write a program to find the square of the number 4

by B.M.Samiul Haque Real (201-15-3057) -
public class print {
public static void main(String[] args) {
int r=4;
int s= (int) Math.pow(r, 2);
System.out.println("Square value of 4 is : "+s);
}}
In reply to First post

Re: Write a program to find the square of the number 4

by Shazzad Shawon (201-15-3404) -
public class SquareTest {

public static void main(String[] args) {

int n = 4;
int sqr = (int) Math.pow(n, 2);
System.out.print("Value : /n" +sqr);

}

}
In reply to First post

Re: Write a program to find the square of the number 4

by Sadia Islam Tonni(201-15-3290) -
package beginnerjava;


public class SquareJava {
public static void main(String[] args) {
int x;
x=4;
System.out.println("Square value of x="+x*x);
}

}
In reply to First post

Re: Write a program to find the square of the number 4

by Tasnim Bill Zannah (201-15-3033) -
package javaapplication;
public class Square {


public static void main(String[]args){
int t;
t=4;
System.out.println("4 Square:"+t*t);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Utsha Roy (201-15-3094) -
public class prac3 {

public static void main(String[] args)

{
int utsha=4;
int s=utsha*utsha;
System.out.println(s);


}
}

In reply to First post

Re: Write a program to find the square of the number 4

by Md. Nazmus Sakib (201-15-3419) -
public class square_num
{

public static void main(String[] args)
{

int num = 4, square;

square = (int)Math.pow(num,2);

System.out.println("Square of 4=" +square);

}

}
In reply to First post

Re: Write a program to find the square of the number 4

by Shahnewaj Bin Hafiz (201-15-3049) -
public class square 4{

public static void main(String[] args)
{
byte number = 4, square;
square = (byte) Math.pow(num,2);
System.out.println("The Square of the number 4 is =" +square);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Mahir Hasan Sifat (201-15-3120) -
import java.io.*;
import java.util.*;

public class demo {

public static void main(String[] args) {


System.out.println("Answer is: "+(int)Math.pow(4,2));

}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Zaky Hossain (201-15-3610) -
public class pp2 {
public static void main(String[] args) {
byte num = 4, square;
//square = (byte) (num*num); or,
square = (byte) Math.pow(num,2);
System.out.println("The Square of the number 4 is = " +square);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Tanjil Alom (201-15-3079) -
public class info {
public static void main(String[] args) {
int num=4;
System.out.println("The Square of the number " +num+ " is = " +num*num);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Ieshita Nasrin Bithi (201-15-3216) -
public class square
{

public static void main(String[] args)
{

int num = 4;
int square = (int) Math.pow(num, 2);
System.out.println("The Square Value of 4 is : "+square);

}

}
In reply to First post

Re: Write a program to find the square of the number 4

by Mst. Sazia Tahosin (201-15-3666) -

public class FindSquare {

public static void main(String[] args) {
int num = 4, square;{
square = (num*num);

System.out.println("The Square of the number 4 is = " +square);

}

}
}

In reply to First post

Re: Write a program to find the square of the number 4

by Dipa Mondal Tumpa (201-15-3214) -
public class Sqr {

public static void main(String[] args) {
int n = 4, Result ;{
Result = (n*n);

System.out.println("The Square of the number 4 is = " +Result);

}

}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Fahim Shahriar (201-15-3629) -
public class square {

public static void main(String[] args)
{
byte number = 4, square;
square = (byte) Math.pow(num,2);
System.out.println("Square of 4 is =" +square);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Shakil Hossen Shawon (201-15-3562) -
public class square 4{

public static void main(String[] args)
{
byte number = 4, square;
square = (byte) Math.pow(num,2);
System.out.println("The Square of the number 4 is =" +square);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by SOHANUR RAHMAN SOHAG_201-15-3161 -
package oopbasic;

public class square 4{

public static void main(String[] args)
{
byte number = 4, square;
square = (byte) Math.pow(num,2);
System.out.println("The Square of the number 4 is =" +square);
}
}
In reply to First post

Re: Write a program to find the square of the number 4

by Sydul Islam Bhuiyan Ridoy (201-15-3061) -
public class pp2 {
public static void main(String[] args) {
byte num = 4, square;
//square = (byte) (num*num); or,
square = (byte) Math.pow(num,2);
System.out.println("The Square of the number 4 is = " +square);
}
}