Advertisement
mominulkarim77

একটি সংখ্যা থেকে আরেকটি সংখ্যা পর্যন্ত সকল সংখ্যার যোগফল

Mar 7th, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int a,b,i,sum=0;
  5. scanf("%d%d",&a,&b);
  6. for (i=a;i<=b;i++) {
  7. sum=sum+i;
  8. }
  9. printf("%d\n",sum);
  10. return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement