View Code of Problem 119

#include<stdio.h>
#include<math.h>
int su(long n)
{
	long i;
for(i=2;i<=sqrt(n);i++)
if(n%i==0)
{return 1;
break;
}
return 0;
}


int main()
{
long int n,count=0;
while(scanf("%d",&n)!=EOF)
{
if(!su(n))
printf("Case #%d: I'm richer than any one\n",++count);
else
printf("Case #%d: What a fxcking day\n",++count);
}
return 0;
}

Double click to view unformatted code.


Back to problem 119