Md. Arifur Rahman (Sazal)
ক্রমে ক্রমে হ্রাস পাচ্ছে বিবেক, ঘুমিয়ে পড়ছে মানবতা……
Pages
Home
ACM Algorithm
Math
E- Balagurusamy
Basic Program
Assembly Language
Gallery
My Portfolio
Thursday, 19 May 2011
uva 11879-Multiple of 17
#include<stdio.h>
#include<stdlib.h>
int main()
{
char n[101];int i=0,c;
//freopen("in.txt","r",stdin);
while(atoi(gets(n))!=0)
{
c = n[i]-48;
while(n[++i])
{
c=(c*10 + (n[i]-48))%17;
}
if(c)
printf("0\n");
else
printf("1\n");
i=0;
}
return(0);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment