#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int c, i, nwhite, nother;
int ndigit[10];
nwhite = nother = 0;
for (i = 0; i < 10; i++)
ndigit[i] = 0;
while (( c = getchar()) != EOF){
if
(c >= '0' && c <= '9')
++ndigit[c-'0'];
else if
(c == ' ' || c == '\t' || c == '\n')
++nwhite;
else
++nother;
}
printf("digits =");
for (i = 0; i < 10; i++)
printf(" %d", ndigit[i]);
printf(", white space = %d, other = %d\n", nwhite, nother);
}
I2RlZmluZSBfQ1JUX1NFQ1VSRV9OT19XQVJOSU5HUwojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgoKaW50IG1haW4odm9pZCkKewoJaW50IGMsIGksIG53aGl0ZSwgbm90aGVyOwoJaW50IG5kaWdpdFsxMF07CgoJbndoaXRlID0gbm90aGVyID0gMDsKCWZvciAoaSA9IDA7IGkgPCAxMDsgaSsrKQoJCW5kaWdpdFtpXSA9IDA7CgoJd2hpbGUgKCggYyA9IGdldGNoYXIoKSkgIT0gRU9GKXsKCQlpZgoJCQkoYyA+PSAnMCcgJiYgYyA8PSAnOScpCgkJCQkrK25kaWdpdFtjLScwJ107CgoJCWVsc2UgaWYKCQkJKGMgPT0gJyAnIHx8IGMgPT0gJ1x0JyB8fCBjID09ICdcbicpCgkJCSsrbndoaXRlOwoKCQllbHNlCgkJCSsrbm90aGVyOwoJCX0KCglwcmludGYoImRpZ2l0cyA9Iik7Cglmb3IgKGkgPSAwOyBpIDwgMTA7IGkrKykKCQlwcmludGYoIiAlZCIsIG5kaWdpdFtpXSk7CglwcmludGYoIiwgd2hpdGUgc3BhY2UgPSAlZCwgb3RoZXIgPSAlZFxuIiwgbndoaXRlLCBub3RoZXIpOwp9Cg==