View Code of Problem 119

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

Double click to view unformatted code.


Back to problem 119