Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //My name is "I suck dick for metsuro's help"
- import java.util.Scanner;
- public class homework5 {
- public static void main (String[] args)
- {
- Scanner input = new Scanner(System.in);
- switch( input.nextInt()) {
- case 1: {
- double r= input.nextDouble();
- double a= Math.PI*r*r;
- System.out.format("%,.2f.%n", a);
- };
- case 2: {
- double l= input.nextDouble();
- double w= input.nextDouble();
- double a=l*w;
- System.out.format("%,.2f.%n", a);
- };
- default: break;
- }
- }
- }
Add Comment
Please, Sign In to add comment