View Code of Problem 119

#include<stdio.h>
int main(){
	int x;
	int count=1;

	while(scanf("%d",&x)!=EOF){
		if(x==1||x==2){
			printf("Case #%d: I'm richer than any one\n",count);
		} else{
			
			int isprime=1;
			for(int i=2;i<x;i++){
				if(x%i==0){
					isprime=0;
					break;
				}	
			}
		if(isprime==1){
			printf("Case #%d: I'm richer than any one\n",count);
		}else{
			printf("Case #%d: What a fxcking day\n",count);
		}		
		}
		count++;
		
	}
	
	
	return 0;
}

Double click to view unformatted code.


Back to problem 119