با توجه به نسخه کامپایلر خود از کتابخانه math.h یا cmath و تابع pow استفاده کنید:
#include <stdio.h>
#include <math.h>
// or #include <cmath>
int main ()
{
double x;
x = pow (2,3); // 2^3
// other codes
return 0;
}
با توجه به نسخه کامپایلر خود از کتابخانه math.h یا cmath و تابع pow استفاده کنید:
#include <stdio.h>
#include <math.h>
// or #include <cmath>
int main ()
{
double x;
x = pow (2,3); // 2^3
// other codes
return 0;
}