Tema: c++ problem
View Single Post
Staro 23.11.2005., 12:19   #1
big_B
Premium
 
big_B's Avatar
 
Datum registracije: Oct 2004
Lokacija: Zagreb
Postovi: 560
c++ problem

Zašto ovo neće raditi ?

Ne prolazi kompajl...

#include <stdio.h>
#include <math.h>
int main () {
int n,i,p;
long double s,pi;
n=10;
if (!(n>0 && n<26)) printf("n nije valjan");
else {
s=0;
for (i=1;i<7;i++){
p=pow(i,8);
s=s+1.0/p;


}
s=s*9450;
pi=pow(s,0.5);

}
printf("PI = %f",pi);
return 0;
}
__________________
big_B je offline   Reply With Quote