We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4427eed commit 18fb141Copy full SHA for 18fb141
1 file changed
AreaSquare.java
@@ -0,0 +1,18 @@
1
+package com.company;
2
+
3
+import java.text.DecimalFormat;
4
+import java.util.Scanner;
5
6
+public class Main {
7
8
+ public static void main(String[] args) {
9
+ // TO FIND AREA OF SQUARE
10
+ Scanner side = new Scanner(System.in);
11
+ DecimalFormat df=new DecimalFormat(".##");
12
+ System.out.println("Enter Side Of Square = ");
13
+ float s =side.nextFloat();
14
+ float area = (s*s);
15
+ System.out.print("Area ="+df.format(area));
16
17
+ }
18
+}
0 commit comments