From a00408d73210040fd835a96d68cffb4639a7eef0 Mon Sep 17 00:00:00 2001 From: bruno Date: Mon, 18 Dec 2023 15:59:29 +0100 Subject: [PATCH] something --- for.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/for.c b/for.c index 49e24e2..0ec97e7 100644 --- a/for.c +++ b/for.c @@ -13,12 +13,16 @@ int for_cyklus(){ printf("Zadal si číslo %d.\n", target); printf("Cyklus FOR:\n"); for(int i = 0; i <= target; i++){ - printf("%d\n", i); + if(i % 2 == 1) { + printf("%d\n", i); + } } - printf("Cyklus WHILE:\n"); + printf("\nCyklus WHILE:\n"); int i = 0; while(i <= target){ - printf("%d\n", i); + if(i % 2 == 1) { + printf("%d\n", i); + } i++; } } \ No newline at end of file