Created
March 29, 2015 16:25
-
-
Save rajurayhan/791bcb1dec94f192fd16 to your computer and use it in GitHub Desktop.
URI Online Judge Solutions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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