Advertisement
Tahamina_Taha

S_chapter_5 prblm_5 series

Aug 7th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.18 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.  
  5.     int n,sum;
  6.     printf("enter value of n: ");
  7.     scanf("%d",&n);
  8.     sum=(n*(n+1))/2;
  9.     printf("summation is  :%d\n",sum);
  10.     return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement