Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int calculochato(int n){
  4.  
  5. int i;
  6. float soma=0, s=0;
  7.  
  8. for(i=1;i<=n;i++){
  9. soma=i;
  10. s+=((soma*soma+1)/(soma+3));
  11. }
  12.  
  13. return s;
  14.  
  15. }
  16.  
  17. int main(){
  18.  
  19. int n;
  20.  
  21. printf("");
  22. scanf("%d", &n);
  23.  
  24. printf("S: %d",calculochato(n));
  25.  
  26.  
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement