# program to find the volume of cube

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

## Program to find the volume of the cube

```Volume of a cube = side * side * side.
```

The cube has all the edges of the same length. The volume of a cube can be calculated by multiplying the length of an edge by itself twice. So if the length of an edge is 4, the volume is 4 x 4 x 4 = 64

### Algorithm

1. Define the value of variable 'a' as the length of an edge of the cube.
2. Multiply 'a' with 'a' and again multiple the results with 'a' to obtain the volume of the cube.
3. Define the variable volume_cube and assign the volume of the cube to it.

O(1)

### C Program

```#include

int main()
{
int a=4;
int volume=a*a*a;
printf("Volume of the cube=%d",volume);
}
```

Output:

```Volume of the cube=64
```

### PHP Program

```<?php
\$a=4;
\$volume=\$a*\$a*\$a;
echo "Volume of the cube=";
echo \$volume;
?>
```

Output:

```Volume of the cube=64
```

### Java Program

```public class cube{
public static void main(String args[])
{
int a=4;
int volume=a*a*a;
System.out.println("Volume ot the cube="+volume);
}
}
```

Output:

```Volume ot the cube=64
```

### C# Program

```using System;
public class Program
{
public static void Main()
{
int a=4;
int volume=a*a*a;

Console.WriteLine("Volume of cube="+volume);
}
}
```

Output:

```Volume of cube=64
```

### Python Program

```a=4
volume=a*a*a
print("volume of the cube="+str(volume))
```

Output:

```volume of the cube=64
```

Next Topic#