Computer Science, asked by snehasinhao9147, 2 months ago

what is output of this program in java programming?

Attachments:

Answers

Answered by Anonymous
1

Answer:

Explanation:

The output of the Java compiler is byte code, which leads to the security and portability of the Java code

Answered by ravi2303kumar
0

Output:

The area of Square = 625

The perimeter of Square = 100

The diagonal of Square = 35.35533905932738

Program :

public class Main

{

public static void main(String[] args) {

int s, ar=0,p=0;

double d=0.0;

s=25;

ar=s*s;

p=4*s;

d=Math.sqrt(2)*s;

System.out.println("The area of Square = "+ar);

System.out.println("The perimeter of Square = "+p);

System.out.println("The diagonal of Square = "+d);

}

}

Similar questions