something

This commit is contained in:
Bruno Rybársky 2023-12-18 15:59:29 +01:00
parent 9a2d9f07eb
commit a00408d732

6
for.c

@ -13,12 +13,16 @@ int for_cyklus(){
printf("Zadal si číslo %d.\n", target); printf("Zadal si číslo %d.\n", target);
printf("Cyklus FOR:\n"); printf("Cyklus FOR:\n");
for(int i = 0; i <= target; i++){ for(int i = 0; i <= target; i++){
if(i % 2 == 1) {
printf("%d\n", i); printf("%d\n", i);
} }
printf("Cyklus WHILE:\n"); }
printf("\nCyklus WHILE:\n");
int i = 0; int i = 0;
while(i <= target){ while(i <= target){
if(i % 2 == 1) {
printf("%d\n", i); printf("%d\n", i);
}
i++; i++;
} }
} }