# program to find the area of square

program to find the area of square on fibonacci, factorial, prime, armstrong, swap, reverse, search, sort, stack, queue, array, linkedlist, tree, graph etc.

## Program to find the area of the square

Area of the square is the amount of space occupied by a square. Square refers to a plane figure with four equal straight sides and four right angles.

### Formula

```area = width � height
Area of square will be calculated as :
area = side2
since width = height;
```

### Algorithm

1. Define the height of any one side of the square as 's.'
2. Calculate the area of the square by multiplying s with s
3. Define the area_square as the area of the square.

O(1)

### C Program

```#include
int main()
{
int s=13;
int area_square=s*s;
printf("Area of the square=%d",area_square);
}
```

Output:

```Area of the square=169
```

### PHP Program

```<?php
\$s=13;
\$area_square=\$s*\$s;
echo "Area of the square=";
echo \$area_square;
?>
```

Output:

```Area of the square=169
```

### Java Program

```public class shpere{
public static void main(String args[])
{
int s=13;
int area_square=s*s;
System.out.println("Area of the square="+area_square);
}
}
```

Output:

```Area of the square=169
```

### C# Program

```using System;
public class Program
{
public static void Main()
{
int s=13;
int area_square=s*s;
Console.WriteLine("Area of the square="+area_square);
}
}
```

Output:

```Area of the square=169
```

### Python Program

```s=13
area_square=s*s
print("Area of the square="+str(area_square))
```

Output:

```Area of the square=169
```

Next Topic#