smt
This commit is contained in:
@@ -5,22 +5,22 @@
|
||||
#include "for.h"
|
||||
#include "stdio.h"
|
||||
|
||||
int for_cyklus(){
|
||||
int for_cyklus() {
|
||||
int target;
|
||||
|
||||
printf("Do akého čísla počítať?");
|
||||
scanf("%d", &target);
|
||||
printf("Zadal si číslo %d.\n", target);
|
||||
printf("Cyklus FOR:\n");
|
||||
for(int i = 0; i <= target; i++){
|
||||
if(i % 2 == 1) {
|
||||
for (int i = 0; i <= target; i++) {
|
||||
if (i % 2 == 1) {
|
||||
printf("%d\n", i);
|
||||
}
|
||||
}
|
||||
printf("\nCyklus WHILE:\n");
|
||||
int i = 0;
|
||||
while(i <= target){
|
||||
if(i % 2 == 1) {
|
||||
while (i <= target) {
|
||||
if (i % 2 == 1) {
|
||||
printf("%d\n", i);
|
||||
}
|
||||
i++;
|
||||
|
||||
Reference in New Issue
Block a user