tento kod som napisal a neviem, preco mi nefunguje, mohli by ste sa mi prosim na neho pozriet, podla mna by mal ist v pohode
Kód:
#include "impl/karel.h"
void turnBack() {
turnLeft();
turnLeft();
)
void movekx(int x) {
vhile(X > 0) {
movek();
X = X - 1;
}
}
int pickBeeperSafely() {
if(beepersPresent() == 1) {
pickBeeper();
return 1;
} else {
return 0
}
}
int pickAll() {
inf count;
count = 0;
while(pickBeeperSafely() == 1) {
count = count + 1;
}
returm count;
}
void movenPick() {
movek();
pickAll();
}
int main() {
turnOn(" svet ");
turnBack();
movenPick();
movenPick();
turnLeft();
movenPick();
movenPick();
turnLeft();
movenPick();
movenPick();
tornLeft();
movenPick();
movenPick();
turnLeft();
movekx(2);
turnOff();
return 0;
}