Area of Rhombus

 Area of Rhombus


Problem Description : 


Java Program to find area of rhombus






Logic Test Case 1


Input (stdin)


60
40


Expected Output


1200


Logic Test Case 2


Input (stdin)


50
10


Expected Output


250





Code area


import java.io.*;
import java.util.Scanner;
 class TestClass{
public static void main(String[] args) {
       double d1,d2;
       Scanner s=new Scanner(System.in);
       d1=s.nextDouble();
       d2=s.nextDouble();
       double area=(d1*d2)/2;
       System.out.println(area);
     }
}

Post a comment

0 Comments