Advertisement
Guest User

Summation of sequence

a guest
Jan 17th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.20 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     int n,sum;
  6.     printf("Enter your number = ");
  7.     scanf("%d",&n);
  8.     sum=(n*(n+1))/2;
  9.     printf("Summation of Sequence is : %d\n",sum);
  10.  
  11.     return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement