View Code of Problem 119

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main() {
	int n,i;
	int count=1;
	while(scanf("%d",&n)!=EOF){
		int flag=0;
		for(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",count);
		}else if(flag==1){
			printf("Case #%d: What a fxcking day\n",count);
		}
		count++;
	}
}

Double click to view unformatted code.


Back to problem 119