#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 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; } } printf("Case #%d: ",count); count++; if(flag==0){ printf("I'm richer than any one\n"); } else{ printf("What a fxcking day\n"); } } } |
Double click to view unformatted code.