Math, asked by AdarshMaurya14, 5 months ago

write a program to calculate area of sphere using scanner class hint (4πr2​

Answers

Answered by Nilanjit
3

import java.util.Scanner;

class TotalSurfaceAreaOfSphere

{

public static void main(String args[])

{

Scanner s= new Scanner(System.in);

System.out.println("Enter the radius of sphere :");

double r=s.nextDouble();

double area=(4*22*r*r)/(7);

System.out.println("Total Surface Area Of sphere is:" +area);

}

}

Answered by rohitkhajuria90
1

Please refer the attached image

Attachments:
Similar questions
Math, 10 months ago