kind of problem bothering me ( pow or * ? )
ok i have this code
Code:
#include <stdio.h>
#include <math.h>
int main(){
float a,b,c;
for (a=1;a<=12;a++){
for (b=1;b<=12;b++){
for (c=1;c<=12;c++){
if (a*a+b*b==c*c){
if (a+b+c==12){
printf("%.0f = %.0f\n",a*a+b*b,c*c);
printf("%.0f\n%.0f\n%.0f\n",a,b,c);
printf("a+b+c = %.0f\n",a+b+c);
printf("-----------------------\n");
printf("Final Result: %.0f\n",a*b*c);
}
}
}
}
}
getchar();
return 0;
}
it shows up the answer i want:
Code:
25 = 25
3
4
5
a+b+c = 12
-----------------------
Final Result: 60
25 = 25
4
3
5
a+b+c = 12
-----------------------
Final Result: 60
but why doesnt it show anything when using pow instead of *?