View Code of Problem 119

#include<stdio.h>
int main()
{
    int n,i,count=0;
    while(scanf("%d",&n)!=EOF)
    {
        int flag=0;
        count++;
        for(i=2;i*i<=n;i++)
            if(n%i==0)
           {
              flag=1;
              break;
           }
        if(flag==0||n==1)
            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