in problem named coins how to stop taking inputs
my code
int main (){ int n; while(scanf("%d", &n) != 'EOF') { int sum = (n/2) + (n/3) + (n/4); if ( sum >= n ) { printf("%d\n",sum); } else { printf("%d\n", n); } }
return 0;
}
Exactly in that way! but instead 'EOF' you mast write just only EOF.Yours counting coins algorithm is bad ;-(