Answer:
Finding length of square side we will take help with Mathematics.
Below is the explanation.
Step-by-step explanation:
AreaOfSqure=x^2
x=

Code Example
#include<iostream> //for input and output
#include<tgmath.h> //for sqrt function
using namespace std;
int main()
{
double areaOfSquare;
cout<<"Enter area of square: ";
cin>>areaOfSquare;
if(areaOfSquare<=0){ //if entered value is less then 0
cout<<"INVALID";
}
else{
cout<<sqrt(areaOfSquare);
}
return 0;
}
Code Explanation
declaring double variable and asking user to input the area of square.
If the entered values i less then or equal to 0 then display invalid because sqrt formula will throw exception.
Otherwise calculate the length of side from calling sqrt function and printing the result by using cout.
Code Output
Enter area of square: 40
6.32456