└── permeter of 4 angles /permeter of 4 angles: -------------------------------------------------------------------------------- 1 | Veena wants to learn shape calculation for Square,Rectangle,Circle,Triangle to implements in programming.Could you please help her to how to write the program. Notes: - Square formula:4a - Rectangle formula:2(l+w) - Circle formula:2πr - Triangle formula:side+base+side 2 | 3 | Input Format 4 | 5 | First input consist of integer for side. 6 | Second and third input consists of integer for Length and Width. 7 | forth input consist of radius. 8 | Fifth,Sixth and Seventh input consist of Base1,side and Base2 . 9 | Constraints 10 | 11 | No Constraints 12 | 13 | Output Format 14 | 15 | Execute the area of shape calculation values. 16 | Sample Input 0 17 | 18 | 9 19 | 8 20 | 7 21 | 6 22 | 5 23 | 4 24 | 3 25 | Sample Output 0 26 | 27 | Perimeter of Square:36 28 | Perimeter of Rectangle:30 29 | Perimeter of Circle:37.69 30 | Perimeter of Triangle:12 31 | 32 | import java.io.*; 33 | import java.util.*; 34 | 35 | public class Solution { 36 | 37 | public static void main(String[] args) { 38 | Scanner sc=new Scanner(System.in); 39 | int s=sc.nextInt(); 40 | int l=sc.nextInt(); 41 | int b=sc.nextInt(); 42 | float r=sc.nextFloat(); 43 | int ba=sc.nextInt(); 44 | int si=sc.nextInt(); 45 | int h=sc.nextInt(); 46 | System.out.println("Perimeter of Square:"+(4*s)); 47 | System.out.println("Perimeter of Rectangle:"+(2*(l+b))); 48 | System.out.println("Perimeter of Circle:"+(Math.floor((2*(Math.PI)*r)*100.0)/100.0)); 49 | System.out.print("Perimeter of Triangle:"+(si+ba+h)); 50 | /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ 51 | } 52 | } 53 | --------------------------------------------------------------------------------