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 k;
		
		k=sqrt(n);
		
		printf("Case #%d:",count++);
		for(i=2;i<=k;i++){
			if(n%i==0)
				break;
		}
		if(i>k){
			printf("I'm richer than any one\n");
		}
		else{
			printf("What a fxcking day\n");
		}
		//count++;
	}
}

Double click to view unformatted code.


Back to problem 119