Putting pow() into use - C Function

C examples for Function:Math Function

Description

Putting pow() into use

Demo Code

#include <stdio.h>
#include <math.h>
int main()/*  w  w w  .  j ava2 s. com*/
{
   double lights;
   lights=pow(2,8);               /* figure 2 to the 8th power */
   printf("Milton, we need %0.f lights.\n",lights);
   return(0);
}

Result


Related Tutorials