#include <stdio.h>
#include <math.h>
int main() {
double x,y;
// uso di sqrt (square root, radice quadrata)
x = 2.0;
y = sqrt(x); // si trova dentro la libreria "math"
printf("x = %.2lf, y = %.8lf\n",x,y);
// uso di pow (power, potenza)
x = y; // prendo come y la radice quad. di 2
y = pow(x,2.0); // si trova dentro la libreria "math"
printf("x = %.8lf, y = %.2lf\n",x,y);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: