Urmatorul enunt de pe www.programmr.com este o problema simpla cu sase scenarii posibile, raspunsurile de selectie fiind introduse de la tastatura.
Se cere sa se identifice prin doua interogari un obiect intr-o matrice 2 x 3 (screen-ul urmator).
Din pacate, softul de pe programmr.com valideaza si topica si compozitia stringului de iesire, dupa urmatorul pattern.
1) "alive" & "outside" sau "alive" & "inside": Obviously the living thing on your mind is a ...
2) "not alive" & "outside" sau "not alive" & "inside" : Obviously the nonliving thing on your mind is a ...
3) ("alive" sau "not alive") && "both": Obviously the nonliving thing inside/outside on your mind is a ...
Altminteri, problema e triviala iar varianta comoda este stocarea entitatilor living/not living etc intr-un tablou bidimensional cu cheile indicate mai jos.
Se cere sa se identifice prin doua interogari un obiect intr-o matrice 2 x 3 (screen-ul urmator).
Din pacate, softul de pe programmr.com valideaza si topica si compozitia stringului de iesire, dupa urmatorul pattern.
1) "alive" & "outside" sau "alive" & "inside": Obviously the living thing on your mind is a ...
2) "not alive" & "outside" sau "not alive" & "inside" : Obviously the nonliving thing on your mind is a ...
3) ("alive" sau "not alive") && "both": Obviously the nonliving thing inside/outside on your mind is a ...
Altminteri, problema e triviala iar varianta comoda este stocarea entitatilor living/not living etc intr-un tablou bidimensional cu cheile indicate mai jos.