Author Topic: Compute square root in C++  (Read 1255 times)

victor

  • Administrator
  • Newbie
  • *****
  • Posts: 5
    • View Profile
Compute square root in C++
« on: July 02, 2014, 04:57:53 am »
#include <stdio.h>
#include <math.h>

int main()
{
    double param, result;
    param = 386;
    result = sqrt (param);
    printf ("sqrt(%f) = %f\n", param, result);
    return 0;
}