Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner; // program uses class Scanner
- public class SCarroll_Assign3_28 {
- public static void main(String[] args) {
- Scanner input = new Scanner( System.in );
- int radius;
- int diameter;
- int area;
- System.out.print( "Enter number for the Radius. " );
- radius = input.nextInt();
- area = radius * radius;
- diameter = radius * 2;
- System.out.printf( "Diameter of the circle is %d\n", radius * 2 );
- System.out.printf( "Circumference of the circle is %f\n", Math.PI * diameter );
- System.out.printf( "Area of the circle is %f\n.", Math.PI * area );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement