Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
krkris
/
Loogikafunktsioon
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5f13a17b
authored
Apr 26, 2022
by
erfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update fail.c
parent
b709ba10
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
708 additions
and
0 deletions
fail.c
fail.c
View file @
5f13a17b
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <stdlib.h>
// kood kommenteerida, muutujate nimed, funktsioonide lisamine
// STRUCT
typedef
struct
{
char
kood
[
5
];
bool
kleebitud
;
bool
lihtimplikant
;
}
implikandid
;
// kleepimata implikandid
typedef
struct
{
char
kood
[
5
];
bool
kleebitud
;
bool
lihtimplikant
;
}
implikandid2
;
// 1.kleepimise tulemus
typedef
struct
{
char
kood
[
5
];
bool
kleebitud
;
bool
lihtimplikant
;
}
implikandid3
;
// 2.kleepimise tulemus
typedef
struct
{
char
kood
[
5
];
}
implikandid4
;
// 3.kleepimise tulemus
// FUNKTSIOONIDE PROTOTÜÜBID
int
kontroll
(
char
[]);
int
sisestus
(
const
char
[],
char
[],
char
[],
char
[],
char
[]);
void
info
(
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
);
void
kontuur
(
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
,
char
);
// MAIN
int
main
(
void
){
char
a
[
16
],
b
[
16
],
c
[
16
],
d
[
16
];
char
f0
,
f1
,
f2
,
f3
,
f4
,
f5
,
f6
,
f7
,
f8
,
f9
,
fA
,
fB
,
fC
,
fD
,
fE
,
fF
;
int
input
;
input
=
sisestus
(
"Sisestage 4x4 Karnaugh kaart voi 16 loogikavaartust:
\n
"
,
a
,
b
,
c
,
d
);
if
(
input
==
1
){
return
1
;
}
if
(
strlen
(
a
)
>=
16
){
f0
=
a
[
0
];
f1
=
a
[
1
];
f2
=
a
[
2
];
f3
=
a
[
3
];
f4
=
a
[
4
];
f5
=
a
[
5
];
f6
=
a
[
6
];
f7
=
a
[
7
];
f8
=
a
[
8
];
f9
=
a
[
9
];
fA
=
a
[
10
];
fB
=
a
[
11
];
fC
=
a
[
12
];
fD
=
a
[
13
];
fE
=
a
[
14
];
fF
=
a
[
15
];
}
else
{
f0
=
a
[
0
];
f1
=
a
[
1
];
f2
=
a
[
3
];
f3
=
a
[
2
];
f4
=
b
[
0
];
f5
=
b
[
1
];
f6
=
b
[
3
];
f7
=
b
[
2
];
f8
=
d
[
0
];
f9
=
d
[
1
];
fA
=
d
[
3
];
fB
=
d
[
2
];
fC
=
c
[
0
];
fD
=
c
[
1
];
fE
=
c
[
3
];
fF
=
c
[
2
];
}
info
(
f0
,
f1
,
f2
,
f3
,
f4
,
f5
,
f6
,
f7
,
f8
,
f9
,
fA
,
fB
,
fC
,
fD
,
fE
,
fF
);
kontuur
(
f0
,
f1
,
f2
,
f3
,
f4
,
f5
,
f6
,
f7
,
f8
,
f9
,
fA
,
fB
,
fC
,
fD
,
fE
,
fF
);
return
0
;
}
// FUNKTSIOONIDE KIRJELDUSED
// Kasutaja sisestatu kontrollimine:
int
kontroll
(
char
a
[
16
]){
int
i
;
for
(
i
=
0
;
i
<
strlen
(
a
);
i
++
){
if
(
a
[
i
]
!=
'0'
&&
a
[
i
]
!=
'1'
){
printf
(
"Lubamatu sisend: %s
\n
"
,
a
);
return
1
;
}
}
if
(
strlen
(
a
)
!=
4
){
printf
(
"Lubamatu sisend %s
\n
"
,
a
);
return
1
;
}
return
0
;
}
// Kasutaja loogikaväärtuste sisestus:
int
sisestus
(
const
char
tekst
[
40
],
char
a
[
16
],
char
b
[
16
],
char
c
[
16
],
char
d
[
16
]){
int
i
;
printf
(
"%s"
,
tekst
);
scanf
(
"%s"
,
a
);
for
(
i
=
0
;
i
<
strlen
(
a
);
i
++
){
if
(
a
[
i
]
!=
'0'
&&
a
[
i
]
!=
'1'
){
printf
(
"Lubamatu sisend: %s
\n
"
,
a
);
return
1
;
}
}
if
(
strlen
(
a
)
==
4
){
do
{
printf
(
"
\n
%s
\n
"
,
a
);
printf
(
"Sisestage K-kaardi TEINE rida:
\n
"
);
scanf
(
"%s"
,
b
);
}
while
(
kontroll
(
b
)
==
1
);
do
{
printf
(
"
\n
%s
\n
"
,
a
);
printf
(
"%s
\n
"
,
b
);
printf
(
"Sisestage K-kaardi KOLMAS rida:
\n
"
);
scanf
(
"%s"
,
c
);
}
while
(
kontroll
(
c
)
==
1
);
do
{
printf
(
"
\n
%s
\n
"
,
a
);
printf
(
"%s
\n
"
,
b
);
printf
(
"%s
\n
"
,
c
);
printf
(
"Sisestage K-kaardi NELJAS rida:
\n
"
);
scanf
(
"%s"
,
d
);
}
while
(
kontroll
(
d
)
==
1
);
printf
(
"
\n
"
);
printf
(
"
\n
Terviklik kaart:
\n
"
);
for
(
i
=
0
;
i
<
strlen
(
a
);
i
++
){
printf
(
"%c "
,
a
[
i
]);
}
printf
(
"
\n
"
);
for
(
i
=
0
;
i
<
strlen
(
b
);
i
++
){
printf
(
"%c "
,
b
[
i
]);
}
printf
(
"
\n
"
);
for
(
i
=
0
;
i
<
strlen
(
c
);
i
++
){
printf
(
"%c "
,
c
[
i
]);
}
printf
(
"
\n
"
);
for
(
i
=
0
;
i
<
strlen
(
d
);
i
++
){
printf
(
"%c "
,
d
[
i
]);
}
printf
(
"
\n
"
);
}
else
if
(
strlen
(
a
)
>=
16
){
for
(
i
=
0
;
i
<
16
;
i
++
){
if
(
a
[
i
]
!=
'0'
&&
a
[
i
]
!=
'1'
){
printf
(
"
\n
Lubamatu sisend: %s
\n
"
,
a
);
return
1
;
}
}
printf
(
"
\n
"
);
printf
(
"
\n
K-kaardi kujul:
\n
"
);
printf
(
"%c %c %c %c
\n
"
,
a
[
0
],
a
[
1
],
a
[
3
],
a
[
2
]);
printf
(
"%c %c %c %c
\n
"
,
a
[
4
],
a
[
5
],
a
[
7
],
a
[
6
]);
printf
(
"%c %c %c %c
\n
"
,
a
[
12
],
a
[
13
],
a
[
15
],
a
[
14
]);
printf
(
"%c %c %c %c
\n
"
,
a
[
8
],
a
[
9
],
a
[
11
],
a
[
10
]);
}
else
{
// Kui kasutaja sisestab mittesobiva märkide arvu, siis programm teeb exit.
printf
(
"Lubamatu sisend: %s
\n
"
,
a
);
return
1
;
}
return
0
;
}
// Reed-Mulleri polünoomi kujul oleva loogikafunktsiooni kohta info andmine:
void
info
(
char
f0
,
char
f1
,
char
f2
,
char
f3
,
char
f4
,
char
f5
,
char
f6
,
char
f7
,
char
f8
,
char
f9
,
char
fA
,
char
fB
,
char
fC
,
char
fD
,
char
fE
,
char
fF
){
if
(
f0
==
'1'
){
printf
(
"Konstant 1 olemas
\n
"
);
}
else
{
printf
(
"Konstant 1 puudub
\n
"
);
}
if
(
fF
==
'1'
){
printf
(
"PAARITU arv liikmeid
\n
"
);
}
else
{
printf
(
"PAARISarv liikmeid
\n
"
);
}
if
(
f0
==
f8
){
printf
(
"x1 puudub
\n
"
);
}
else
{
printf
(
"x1 olemas
\n
"
);
}
if
(
f0
==
f4
){
printf
(
"x2 puudub
\n
"
);
}
else
{
printf
(
"x2 olemas
\n
"
);
}
if
(
f0
==
f2
){
printf
(
"x3 puudub
\n
"
);
}
else
{
printf
(
"x3 olemas
\n
"
);
}
if
(
f0
==
f1
){
printf
(
"x4 puudub
\n
"
);
}
else
{
printf
(
"x4 olemas
\n
"
);
}
if
(
f7
==
'1'
){
printf
(
"ilma [x1] PAARITU
\n
"
);
}
else
{
printf
(
"ilma [x1] PAARIS
\n
"
);
}
if
(
fB
==
'1'
){
printf
(
"ilma [x2] PAARITU
\n
"
);
}
else
{
printf
(
"ilma [x2] PAARIS
\n
"
);
}
if
(
fD
==
'1'
){
printf
(
"ilma [x3] PAARITU
\n
"
);
}
else
{
printf
(
"ilma [x3] PAARIS
\n
"
);
}
if
(
fE
==
'1'
){
printf
(
"ilma [x4] PAARITU
\n
"
);
}
else
{
printf
(
"ilma [x4] PAARIS
\n
"
);
}
// info funktsiooni lõpp siin
}
// Kontuuride leidmine
void
kontuur
(
char
f0
,
char
f1
,
char
f2
,
char
f3
,
char
f4
,
char
f5
,
char
f6
,
char
f7
,
char
f8
,
char
f9
,
char
fA
,
char
fB
,
char
fC
,
char
fD
,
char
fE
,
char
fF
){
implikandid
implikant
[
16
];
int
i
=
0
;
int
j
,
k
;
if
(
f0
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"0000"
);
i
++
;
}
if
(
f1
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"0001"
);
i
++
;
}
if
(
f2
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"0010"
);
i
++
;
}
if
(
f3
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"0011"
);
i
++
;
}
if
(
f4
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"0100"
);
i
++
;
}
if
(
f5
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"0101"
);
i
++
;
}
if
(
f6
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"0110"
);
i
++
;
}
if
(
f7
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"0111"
);
i
++
;
}
if
(
f8
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"1000"
);
i
++
;
}
if
(
f9
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"1001"
);
i
++
;
}
if
(
fA
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"1010"
);
i
++
;
}
if
(
fB
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"1011"
);
i
++
;
}
if
(
fC
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"1100"
);
i
++
;
}
if
(
fD
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"1101"
);
i
++
;
}
if
(
fE
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"1110"
);
i
++
;
}
if
(
fF
==
'1'
){
strcpy
(
implikant
[
i
].
kood
,
"1111"
);
i
++
;
}
int
eri
=
0
;
implikandid2
implikant2
[
16
];
int
q
;
int
t
=
0
;
int
o
;
//printf("Esimese kleepimise tulemus: \n");
for
(
j
=
0
;
j
<
i
;
j
++
){
for
(
k
=
0
;
k
<
i
;
k
++
){
if
(
implikant
[
j
].
kood
[
0
]
!=
implikant
[
k
].
kood
[
0
]){
eri
++
;
q
=
0
;
}
if
(
implikant
[
j
].
kood
[
1
]
!=
implikant
[
k
].
kood
[
1
]){
eri
++
;
q
=
1
;
}
if
(
implikant
[
j
].
kood
[
2
]
!=
implikant
[
k
].
kood
[
2
]){
eri
++
;
q
=
2
;
}
if
(
implikant
[
j
].
kood
[
3
]
!=
implikant
[
k
].
kood
[
3
]){
eri
++
;
q
=
3
;
}
if
(
eri
==
1
){
if
(
q
==
0
){
strcpy
(
implikant2
[
t
].
kood
,
implikant
[
j
].
kood
);
// des, source
implikant2
[
t
].
kood
[
q
]
=
'-'
;
}
if
(
q
==
1
){
strcpy
(
implikant2
[
t
].
kood
,
implikant
[
j
].
kood
);
implikant2
[
t
].
kood
[
q
]
=
'-'
;
}
if
(
q
==
2
){
strcpy
(
implikant2
[
t
].
kood
,
implikant
[
j
].
kood
);
implikant2
[
t
].
kood
[
q
]
=
'-'
;
}
if
(
q
==
3
){
strcpy
(
implikant2
[
t
].
kood
,
implikant
[
j
].
kood
);
implikant2
[
t
].
kood
[
q
]
=
'-'
;
}
implikant
[
j
].
kleebitud
=
true
;
t
++
;
}
eri
=
0
;
}
}
for
(
j
=
0
;
j
<
t
;
j
++
){
for
(
k
=
j
+
1
;
k
<
t
;
k
++
){
if
(
strcmp
(
implikant2
[
j
].
kood
,
implikant2
[
k
].
kood
)
==
0
){
for
(
o
=
k
;
o
<
t
-
1
;
o
++
){
strcpy
(
implikant2
[
o
].
kood
,
implikant2
[
o
+
1
].
kood
);
}
t
--
;
j
--
;
}
}
}
/*for(j = 0; j<t; j++){
printf("%s\n", implikant2[j].kood);
}*/
printf
(
"
\n
"
);
//printf("\n");
//printf("\n");
implikandid3
implikant3
[
16
];
int
v
=
0
;
//printf("Teise kleepimise tulemus: \n");
for
(
j
=
0
;
j
<
t
;
j
++
){
for
(
k
=
0
;
k
<
t
;
k
++
){
if
(
implikant2
[
j
].
kood
[
0
]
!=
implikant2
[
k
].
kood
[
0
]){
eri
++
;
q
=
0
;
}
if
(
implikant2
[
j
].
kood
[
1
]
!=
implikant2
[
k
].
kood
[
1
]){
eri
++
;
q
=
1
;
}
if
(
implikant2
[
j
].
kood
[
2
]
!=
implikant2
[
k
].
kood
[
2
]){
eri
++
;
q
=
2
;
}
if
(
implikant2
[
j
].
kood
[
3
]
!=
implikant2
[
k
].
kood
[
3
]){
eri
++
;
q
=
3
;
}
if
(
eri
==
1
){
if
(
q
==
0
){
strcpy
(
implikant3
[
v
].
kood
,
implikant2
[
j
].
kood
);
implikant3
[
v
].
kood
[
q
]
=
'-'
;
}
if
(
q
==
1
){
strcpy
(
implikant3
[
v
].
kood
,
implikant2
[
j
].
kood
);
implikant3
[
v
].
kood
[
q
]
=
'-'
;
}
if
(
q
==
2
){
strcpy
(
implikant3
[
v
].
kood
,
implikant2
[
j
].
kood
);
implikant3
[
v
].
kood
[
q
]
=
'-'
;
}
if
(
q
==
3
){
strcpy
(
implikant3
[
v
].
kood
,
implikant2
[
j
].
kood
);
implikant3
[
v
].
kood
[
q
]
=
'-'
;
}
implikant2
[
j
].
kleebitud
=
true
;
v
++
;
}
eri
=
0
;
}
}
for
(
j
=
0
;
j
<
v
;
j
++
){
for
(
k
=
j
+
1
;
k
<
v
;
k
++
){
if
(
strcmp
(
implikant3
[
j
].
kood
,
implikant3
[
k
].
kood
)
==
0
){
for
(
o
=
k
;
o
<
v
-
1
;
o
++
){
strcpy
(
implikant3
[
o
].
kood
,
implikant3
[
o
+
1
].
kood
);
}
v
--
;
j
--
;
}
}
}
/*for(j = 0; j<v; j++){
printf("%s\n", implikant3[j].kood);
}
printf("\n");
printf("\n");
printf("\n");*/
implikandid4
implikant4
[
16
];
int
r
=
0
;
//printf("Kolmanda kleepimise tulemus: \n");
for
(
j
=
0
;
j
<
v
;
j
++
){
for
(
k
=
0
;
k
<
v
;
k
++
){
if
(
implikant3
[
j
].
kood
[
0
]
!=
implikant3
[
k
].
kood
[
0
]){
eri
++
;
q
=
0
;
}
if
(
implikant3
[
j
].
kood
[
1
]
!=
implikant3
[
k
].
kood
[
1
]){
eri
++
;
q
=
1
;
}
if
(
implikant3
[
j
].
kood
[
2
]
!=
implikant3
[
k
].
kood
[
2
]){
eri
++
;
q
=
2
;
}
if
(
implikant3
[
j
].
kood
[
3
]
!=
implikant3
[
k
].
kood
[
3
]){
eri
++
;
q
=
3
;
}
if
(
eri
==
1
){
if
(
q
==
0
){
strcpy
(
implikant4
[
r
].
kood
,
implikant3
[
j
].
kood
);
implikant3
[
r
].
kood
[
q
]
=
'-'
;
}
if
(
q
==
1
){
strcpy
(
implikant4
[
r
].
kood
,
implikant3
[
j
].
kood
);
implikant4
[
r
].
kood
[
q
]
=
'-'
;
}
if
(
q
==
2
){
strcpy
(
implikant4
[
r
].
kood
,
implikant3
[
j
].
kood
);
implikant4
[
r
].
kood
[
q
]
=
'-'
;
}
if
(
q
==
3
){
strcpy
(
implikant4
[
r
].
kood
,
implikant3
[
j
].
kood
);
implikant4
[
r
].
kood
[
q
]
=
'-'
;
}
implikant3
[
j
].
kleebitud
=
true
;
r
++
;
}
eri
=
0
;
}
}
for
(
j
=
0
;
j
<
r
;
j
++
){
for
(
k
=
j
+
1
;
k
<
r
;
k
++
){
if
(
strcmp
(
implikant4
[
j
].
kood
,
implikant4
[
k
].
kood
)
==
0
){
for
(
o
=
k
;
o
<
r
-
1
;
o
++
){
strcpy
(
implikant4
[
o
].
kood
,
implikant4
[
o
+
1
].
kood
);
}
r
--
;
j
--
;
}
}
}
/*for(j = 0; j<r; j++){
printf("%s\n", implikant4[j].kood);
}
printf("\n");
printf("\n");
printf("\n");
//printf("Lihtimplikandid: \n");
for(j = 0; j<i; j++){
if(implikant[j].kleebitud != true){
//printf("%s\n", implikant[j].kood);
}
}
for(j = 0; j<t; j++){
if(implikant2[j].kleebitud != true){
//printf("%s\n", implikant2[j].kood);
}
}
for(j = 0; j<v; j++){
if(implikant3[j].kleebitud != true){
//printf("%s\n", implikant3[j].kood);
}
}
for(j = 0; j<r; j++){
printf("%s\n", implikant4[j].kood);
}
printf("\n");
printf("\n");
printf("\n");
*/
// Lihtimplikantide disjunktsiooni loomine, loogikamuutujate vastavaks seadmine TaDNK jaoks
printf
(
"TaDNK:
\n
"
);
int
m
;
char
indeks
[
10
];
char
tulemus
[
50
];
int
z
=
-
1
;
for
(
j
=
0
;
j
<
i
;
j
++
){
if
(
implikant
[
j
].
kleebitud
!=
true
){
for
(
m
=
0
;
m
<
4
;
m
++
){
if
(
implikant
[
j
].
kood
[
m
]
==
'0'
){
z
++
;
tulemus
[
z
]
=
'-'
;
z
++
;
tulemus
[
z
]
=
'X'
;
z
++
;
sprintf
(
indeks
,
"%d"
,
m
+
1
);
tulemus
[
z
]
=
indeks
[
0
];
}
else
if
(
implikant
[
j
].
kood
[
m
]
==
'1'
){
z
++
;
tulemus
[
z
]
=
'X'
;
z
++
;
sprintf
(
indeks
,
"%d"
,
m
+
1
);
tulemus
[
z
]
=
indeks
[
0
];
}
if
(
m
==
3
){
z
++
;
tulemus
[
z
]
=
'\t'
;
z
++
;
tulemus
[
z
]
=
'V'
;
z
++
;
tulemus
[
z
]
=
'\t'
;
}
}
}
}
for
(
j
=
0
;
j
<
t
;
j
++
){
if
(
implikant2
[
j
].
kleebitud
!=
true
){
for
(
m
=
0
;
m
<
4
;
m
++
){
if
(
implikant2
[
j
].
kood
[
m
]
==
'0'
){
z
++
;
tulemus
[
z
]
=
'-'
;
z
++
;
tulemus
[
z
]
=
'X'
;
z
++
;
sprintf
(
indeks
,
"%d"
,
m
+
1
);
tulemus
[
z
]
=
indeks
[
0
];
}
else
if
(
implikant2
[
j
].
kood
[
m
]
==
'1'
){
z
++
;
tulemus
[
z
]
=
'X'
;
z
++
;
sprintf
(
indeks
,
"%d"
,
m
+
1
);
tulemus
[
z
]
=
indeks
[
0
];
}
if
(
m
==
3
){
z
++
;
tulemus
[
z
]
=
'\t'
;
z
++
;
tulemus
[
z
]
=
'V'
;
z
++
;
tulemus
[
z
]
=
'\t'
;
}
}
}
}
for
(
j
=
0
;
j
<
v
;
j
++
){
if
(
implikant3
[
j
].
kleebitud
!=
true
){
for
(
m
=
0
;
m
<
4
;
m
++
){
if
(
implikant3
[
j
].
kood
[
m
]
==
'0'
){
z
++
;
tulemus
[
z
]
=
'-'
;
z
++
;
tulemus
[
z
]
=
'X'
;
z
++
;
sprintf
(
indeks
,
"%d"
,
m
+
1
);
tulemus
[
z
]
=
indeks
[
0
];
}
else
if
(
implikant3
[
j
].
kood
[
m
]
==
'1'
){
z
++
;
tulemus
[
z
]
=
'X'
;
z
++
;
sprintf
(
indeks
,
"%d"
,
m
+
1
);
tulemus
[
z
]
=
indeks
[
0
];
}
if
(
m
==
3
){
z
++
;
tulemus
[
z
]
=
'\t'
;
z
++
;
tulemus
[
z
]
=
'V'
;
z
++
;
tulemus
[
z
]
=
'\t'
;
}
}
}
}
for
(
j
=
0
;
j
<
r
;
j
++
){
for
(
m
=
0
;
m
<
4
;
m
++
){
if
(
implikant4
[
j
].
kood
[
m
]
==
'0'
){
z
++
;
tulemus
[
z
]
=
'-'
;
z
++
;
tulemus
[
z
]
=
'X'
;
z
++
;
sprintf
(
indeks
,
"%d"
,
m
+
1
);
tulemus
[
z
]
=
indeks
[
0
];
}
else
if
(
implikant4
[
j
].
kood
[
m
]
==
'1'
){
z
++
;
tulemus
[
z
]
=
'X'
;
z
++
;
sprintf
(
indeks
,
"%d"
,
m
+
1
);
tulemus
[
z
]
=
indeks
[
0
];
}
if
(
m
==
3
){
z
++
;
tulemus
[
z
]
=
'\t'
;
z
++
;
tulemus
[
z
]
=
'V'
;
z
++
;
tulemus
[
z
]
=
'\t'
;
}
}
}
// TaDNK välja printimine
tulemus
[
z
-
1
]
=
' '
;
printf
(
"%s"
,
tulemus
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment