write a c++ program that calculates the perimeter of a square
Here's a simple C++ program that calculates the perimeter of a square when the length of its side is given:

```c++
#include <iostream>
using namespace std;

int main() {
    float side, perimeter;

    // Prompt the user to enter the side length
    cout << Enter the length of the side of the square: ;
    cin >> side;

    // Calculate the perimeter
    perimeter = 4 * side;

    // Display the result
    cout << The perimeter of the square is:  << perimeter << endl;

    return 0;
}
```

The program prompts the user to enter the length of the side of the square, calculates the perimeter, and then displays the result. The formula for the perimeter of a square is simply the length of one side multiplied by 4.