This is one of tasks, which I had to do for the recruitment process at some company. Unfortunately they didn't like it so I've decided to share it here for discussion.CircleArea.h#ifndef CIRCLEAREA_H_#define CIRCLEAREA_H_//PI Number, with max precision for double (8 bytes)const double PI = 3.141592653589793115997963468544185161590576171875;double circleArea(double radius);#endifCircleArea.cpp#include CircleArea.h#include <stdexcept>double circleArea(double radius){    if(radius < 0)    {        throw std::invalid_argument(Radius cannot be less than zero);    }    return PI * radius * radius;}Why could the solution have been disliked by the recruiters?
Calculating the area of a circle
c++;interview questions