From eddf38798ab82719c1bf655e3f67ede283642df5 Mon Sep 17 00:00:00 2001 From: Stepan Date: Thu, 7 May 2026 19:48:06 +0300 Subject: [PATCH] new l5.c --- c/l5.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/c/l5.c b/c/l5.c index e69de29..d371c1f 100644 --- a/c/l5.c +++ b/c/l5.c @@ -0,0 +1,28 @@ +#include + +int main() { + int pol; + printf("Enter number "); + scanf("%d", &pol); + if(pol > 9) { + printf("Error: number must be from 1 to 9\n"); + return 0; + } + else if(pol < 1) { + printf("Error: number must be from 1 to 9\n"); + return 0; + } + int x = 1; + int s = 0; + while(1) { + printf("%d * %d = %d\n", pol, x, pol*x); + x++; + s++; + if(s < 10) { + continue; + } + else { + break; + } + } +} \ No newline at end of file