Kimossab

Somatorio [(i!) + i]^i

Jan 19th, 2014
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. float SomaIt(int N)
  2. {
  3.     int i, j;
  4.     float fact = 1, par = 0, pot=1, soma = 0;
  5.     for (i=1; i <= N; i++)
  6.     {
  7.         pot = 1;
  8.         fact *= i;
  9.         par = fact + i;
  10.         for(j=0; j<i; j++)
  11.             pot *= par;
  12.         soma += pot;
  13.     }
  14.     return soma;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment