Computer Science, asked by tanwardhaniram8, 2 days ago

3) write a program to read twonumbers and display theirsquares and square roots.​

Answers

Answered by utkarshtripathi0077
0

Answer:

import java.util.Scanner;

public class Square1 {

public static void main(String args[]) {

Double num;

Scanner sc= new Scanner(System.in);

System.out.print("Enter a number: ");

num=sc.nextDouble();

Double square = num*num;

System.out.println("Square of "+ num + " is: "+ square);

}

}

Similar questions
Math, 8 months ago