diff --git a/c/l6.c b/c/l6.c new file mode 100644 index 0000000..d8ad019 --- /dev/null +++ b/c/l6.c @@ -0,0 +1,12 @@ +#include + +int main() { + int pol; + printf("Enter number "); + scanf("%d", &pol); + int x1 = pol % 10; + int x2 = (pol / 10) % 10; + int x3 = ((pol / 10) / 10) % 10; + int sum = x1+x2+x3; + printf("%d\n", sum); +} \ No newline at end of file