Write a program to input the side of a square and display the
length of the diagonal of square.. write accurately i have to type
Answers
Answered by
0
Java program to print the diagonal of square using scanner class.
Explanation:
public class square
{
public static void main (String args[])
{
Scanner sc=new Scanner (System.in)
int a;
double dia;
System.out.println("Please enter the side of square:");
a=sc.nextInt;
dia=a*√2;
System.out.println("The diagonal of the square is:");
}}
*Mate above is ur answer please mark brainiest*
Similar questions