Skip to content

Instantly share code, notes, and snippets.

@rajurayhan
Created March 29, 2015 16:25
Show Gist options
  • Save rajurayhan/791bcb1dec94f192fd16 to your computer and use it in GitHub Desktop.
Save rajurayhan/791bcb1dec94f192fd16 to your computer and use it in GitHub Desktop.
URI Online Judge Solutions
#include<stdio.h>
int main(){
int x,y,i,sum=0;
scanf("%d %d",&x,&y);
if(y>x){
for(i=x;i<=y;i++){
if(i%13!=0)
sum=sum+i;
}
}
else if(x>y){
for(i=y;i<=x;i++){
if(i%13!=0)
sum=sum+i;
}
}
printf("%d\n",sum);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment