add_while_loop
This commit is contained in:
parent
125e6c9af3
commit
9a2d9f07eb
11
for.c
11
for.c
@ -10,8 +10,15 @@ int for_cyklus(){
|
||||
|
||||
printf("Do akého čísla počítať?");
|
||||
scanf("%d", &target);
|
||||
|
||||
for(int i = 1; i <= target; i++){
|
||||
printf("Zadal si číslo %d.\n", target);
|
||||
printf("Cyklus FOR:\n");
|
||||
for(int i = 0; i <= target; i++){
|
||||
printf("%d\n", i);
|
||||
}
|
||||
printf("Cyklus WHILE:\n");
|
||||
int i = 0;
|
||||
while(i <= target){
|
||||
printf("%d\n", i);
|
||||
i++;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user