Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Practicer {
- public static void main(String[] args) {
- Scanner cin = new Scanner(System.in);
- while(cin.hasNext()){
- int a = cin.nextInt();
- int b = cin.nextInt();
- int c = cin.nextInt();
- double s = ((a+b+c)/2);
- //double price = s*(s-a)*(s-b)*(s-c);
- System.out.printf("%.0f",s*(s-a)*(s-b)*(s-c));
- //注意是printf,不是println
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement