View Single Post
Old Feb 18th, 2005, 1:53 AM   #3
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

Can't figure out your problem. Must be your compiler, this works just fine with Pelles C under Windows XP.

// PellesC

#include <stdio.h>
#include <math.h>

int main()
{
  int x = log(8)/log(2);
  
  printf("x = %d\n", x);  // result is x = 3
  
  getchar();  // wait
  return 0;
}
Dietrich is offline   Reply With Quote