|
Thread: pow
-
Oct 3rd, 2006, 04:02 PM
#1
Thread Starter
Lively Member
pow
Hi,
The following is my code. When I tried to compile it. It give me an error massage "undefined reference to 'pow'. I thought I did include #include <math.h>....
Any idea?
Thanks.
#include <stdio.h>
#include <conio.h>
#include <math.h>
void main(){
int i;
float s, l;
printf("\n\t|----------------------------------------------------|");
printf("\n\t| x | x^2 | cube root of x | x^4 |");
printf("\n\t|----------------------------------------------------|");
for (i=1;i<=100;i++)
{
s = i*i;
l = s*s;
printf("\n\t| %d |",i);
printf(" %5.0f |",s);
printf(" %5.3f |",pow(i,1.0/3.0));
printf(" %5.0f |",l);
printf("\n");
getch();
}
printf("\t|-----------------------------------------------------|");
getch();
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|