summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-03-17 15:02:47 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2024-03-17 15:02:47 +0100
commitd4088cc3d8afb019d612de57aa3fe86a3ca8f633 (patch)
tree61ee496f6858c453ffcb3baedbf1b97ef8b97384
parentP2: popravljena DN01 in izdelani DN02 in DN03 (diff)
downloadr-d4088cc3d8afb019d612de57aa3fe86a3ca8f633.tar
r-d4088cc3d8afb019d612de57aa3fe86a3ca8f633.tar.gz
r-d4088cc3d8afb019d612de57aa3fe86a3ca8f633.tar.bz2
r-d4088cc3d8afb019d612de57aa3fe86a3ca8f633.tar.lz
r-d4088cc3d8afb019d612de57aa3fe86a3ca8f633.tar.xz
r-d4088cc3d8afb019d612de57aa3fe86a3ca8f633.tar.zst
r-d4088cc3d8afb019d612de57aa3fe86a3ca8f633.zip
-rw-r--r--šola/p2/dn/DN02a_63230317.c5
-rw-r--r--šola/p2/dn/DN02b_63230317.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/šola/p2/dn/DN02a_63230317.c b/šola/p2/dn/DN02a_63230317.c
index c9bbad2..55144c7 100644
--- a/šola/p2/dn/DN02a_63230317.c
+++ b/šola/p2/dn/DN02a_63230317.c
@@ -27,6 +27,11 @@ int main (void) {
putchar('\n');
return 1;
}
+ if (znak == ' ') {
+ putchar('1');
+ stanje = PRVI_ZNAK;
+ continue;
+ }
if (znak != ' ') {
putchar('0');
stanje = PRED_ZAČETKOM;
diff --git a/šola/p2/dn/DN02b_63230317.c b/šola/p2/dn/DN02b_63230317.c
index ebaa364..260c524 100644
--- a/šola/p2/dn/DN02b_63230317.c
+++ b/šola/p2/dn/DN02b_63230317.c
@@ -14,7 +14,7 @@ int main (void) {
int znak = 0;
while (true) {
znak = getchar();
- if (stanje == HEX || stanje == BIN || stanje == ŠTEVILKE || stanje == NIČLA) { // term za * stanja
+ if (stanje == HEX || stanje == BIN || stanje == ŠTEVILKE || stanje == NIČLA || stanje == OCTAL) { // term za * stanja
if (znak == EOF || znak == '\n')
goto pravilno_in_konec;
if (znak == ' ')