0
I am doing a language exercise c and wanted to know if anyone can help me understand how I do this function without adding library
i have no idea how to write it in the program,my doubt is how I raise exponents squared in these types of exercises, my primary idea, is that each sequence is multiplying by odd numbers, EX: 1/3+ 1/61/61/6, the 1 third has 1, 1 sixth has 3 , 1 ninth has 5
int main(){
float p=1;
int n,r,denominador=1;
//entrada de dados
printf("escreva o números de termos a serem somados= \n");
scanf("%d",&n);
//função
for(int i=1;i<n;i++){
denominador*=3;
p= p + i/denominador;
}
}
Search about the function
pow
of the C language.– Woss
a I forgot to specify q he asks without adding library,
– João vitor jun watanabe