1. #include #include
int main(int argc, char** argv){ char a, b, c, d; if (scanf("%c%c%c%c", &a, &b, &c, &d) != 4) printf("Input error\n"); else { if (isdigit(a) && isdigit(b) && isdigit(c) && isdigit(d) && (a > '0')) printf("Sum is %d\n", a + b + c + d - 4 * '0'); else printf("Is itn't correct number\n"); } return 0;}