View Code of Problem 119

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main(){
	int N,count=0;
	while(scanf("%d",&N)!=EOF){
		int i,flag=0;
		count++;
		for(i=2;i<=sqrt(N);i++){
			if(N%i==0){
				flag=1;
				break;
			}
		}
		if(flag==1)printf("Case #%d:What a fxcking day\n",count);
		else printf("Case #%d:I'm richer than any one\n",count);
	}
}

Double click to view unformatted code.


Back to problem 119