l6.c 238 B

123456789101112
  1. #include <stdio.h>
  2. int main() {
  3. int pol;
  4. printf("Enter number ");
  5. scanf("%d", &pol);
  6. int x1 = pol % 10;
  7. int x2 = (pol / 10) % 10;
  8. int x3 = ((pol / 10) / 10) % 10;
  9. int sum = x1+x2+x3;
  10. printf("%d\n", sum);
  11. }