Skip to content

Instantly share code, notes, and snippets.

@ozcan
Created February 22, 2014 13:41
Show Gist options
  • Save ozcan/9154969 to your computer and use it in GitHub Desktop.
Save ozcan/9154969 to your computer and use it in GitHub Desktop.
#include"stdio.h"
#include"stdlib.h"
int main()
{
int x,y,z, sayac;
float a, toplam;
toplam = 0;
sayac= 0;
for ( x=-3;x<=3;x++) {
for ( y=-3;y<=3;y++) {
for ( z=-3;z<=3;z++){
if(x+y != 0 && x-y != 0){
a=((-x*x)+(2*y*z*z)-(3*x*y*x))/((x+y)*(x-y));
toplam = toplam + a;
sayac++;
printf("a=%f\n",a);
}
}
}
}
printf("sonuc: %f", toplam/sayac);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment