In reply to First post
Re: Write a program to find the square of the number 4
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);
}
}
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
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);
}
}
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
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);
}
}
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
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);
}
}
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
package Main;
public class Main {
public static void main(String[] args) {
int a;
a=4;
System.out.println("Value of 4 Square: "+a*a);
}
}
public class Main {
public static void main(String[] args) {
int a;
a=4;
System.out.println("Value of 4 Square: "+a*a);
}
}
In reply to First post
Re: Write a program to find the square of the number 4
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);
}
}
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
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);
}
}
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
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);
}
}
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
package Main;
public class Main {
public static void main(String[] args) {
int a;
a=4;
System.out.println("Value of 4 Square: "+a*a);
}
}
public class Main {
public static void main(String[] args) {
int a;
a=4;
System.out.println("Value of 4 Square: "+a*a);
}
}
In reply to First post
Re: Write a program to find the square of the number 4
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);
}
}
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
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);
}
}
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
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);
}
}
}
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
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);
}}
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
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);
}
}
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
package beginnerjava;
public class SquareJava {
public static void main(String[] args) {
int x;
x=4;
System.out.println("Square value of x="+x*x);
}
}
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
package javaapplication;
public class Square {
public static void main(String[]args){
int t;
t=4;
System.out.println("4 Square:"+t*t);
}
}
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
public class Main
{
public static void main(String[] args)
{
byte h = 4;
byte r = (byte) (h*h);
System.out.println("Square of the number is: " + r);
}
}
In reply to First post
Re: Write a program to find the square of the number 4
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
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);
}
}
{
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
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);
}
}
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
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));
}
}
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
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);
}
}
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
public class info {
public static void main(String[] args) {
int num=4;
System.out.println("The Square of the number " +num+ " is = " +num*num);
}
}
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
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);
}
}
{
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
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
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);
}
}
}
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
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);
}
}
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
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);
}
}
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
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);
}
}
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
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);
}
}