f(x,y,z)=(-x*x)+(2*y*z*z)-(3*x*y*z))/((x*x)-(y*y)) dir. x,y,z -3ile3 arasında değerler alabilir.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x,y,z,sayac;
float ort,fonk,top;
top=0;
sayac=1;
for(x=-3;x<=3;x++){
for(y=-3;y<=3;y++){
if(x*x==y*y)continue;
for(z=-3;z<=3;z++){
fonk=(-(x*x)+(2*y*z*z)-(3*x*y*z))/((x*x)-(y*y));
top=top+fonk;
sayac=sayac+1;
}
}
}
ort=top/sayac;
printf("toplam %.2f dir",top);
printf("ortalama %.2f dir.",ort);
return 0;
}
Hiç yorum yok:
Yorum Gönder