From d3344356282d50bc1316d065c8e337921ac2b5d2 Mon Sep 17 00:00:00 2001 From: Stepan Date: Thu, 7 May 2026 20:13:33 +0300 Subject: [PATCH] add new file l6.c --- c/l6.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 c/l6.c 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