Hi all,
I have a problem compiling this simple program in gcc under my RH linux
6.1. I am giving it here.
#include <math.h>
#include <stdio.h>
main()
{
double i,n;
n=0;
for (i=0;i<100;i++)
n += sqrt (i);
printf("the sum of square roots of first 100 natural numbers=%f",n);
}
is giving an error "undefined reference to 'sqrt' ". Can anybody tell me
what the problem may be?
thanks in advance,
Madhav
- problem with math.h Madhav
- problem with math.h Gabor Z. Papp
- Re: problem with math.h Karthik Vishwanath
- Re: problem with math.h Andre Majorel
