View Code of Problem 119

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

Double click to view unformatted code.


Back to problem 119