Advertisement
Guest User

boltu vs balti

a guest
Mar 22nd, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     int n,m,i;
  5.     scanf("%d%d",&n,&m);
  6.     int sum=0;
  7.     for(i=n;i<=m;i++){
  8.     sum=sum+i;
  9.     }
  10.   printf("Sum of %d to %d is : %d%s\n",n,m,sum,";");
  11.     return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement