View Code of Problem 119

#include<stdio.h>
int main()
{
  int n,k=0;
  while(scanf("%d",&n)==1){
  	 k++;
  	 if(n==1)
  	 printf("Case #%d: I'm richer than any one\n",k);
  	 else if(n==2)
  	  printf("Case #%d: What a fxcking day\n",k);
  	 else{
  	 	   int j=2;
  		while(n%j!=0){
  			j++;
		  }
		  if(j==n) 
		  printf("Case #%d: I'm richer than any one\n",k);
	    else 
	     printf("Case #%d: What a fxcking day\n",k);
	   }
  }
  return 0;
}

Double click to view unformatted code.


Back to problem 119