|
Description
This shows how to use
the pow() function .
Code
#include <stdio.h>
#include <dos.h>
#include <stdlib.h>
#include <math.h>
int main(void)
{
double result;
int number1 = 5.0;
int number2 = 3.0;
clrscr();
result = pow(number1,number2);
printf("%d to the power of %d
is
%lf.\n",number1,number2,result);
return 0;
}
Information
tested using LCC Win
32 and Windows XP
|