nikolas_serafini

Lista 1 - Exercício 40

May 22nd, 2013
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. int main()
  6. {
  7.     float numb,q,fnum,desirnum;
  8.  
  9.     printf("Entre com a o numero, a razao e o primeiro elemento da progressao geometrica (respectivamente)\n");
  10.     scanf("%f %f %f",&numb,&q,&fnum);
  11.  
  12.     desirnum = fnum*pow(q,numb-1);
  13.  
  14.     printf("O n-esimo termo da serie eh %f\n",desirnum);   
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment