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
b35c0d2d
authored
Mar 10, 2022
by
erfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Kood.c
parent
0da263e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
Kood.c
Kood.c
View file @
b35c0d2d
...
@@ -16,30 +16,58 @@ int main(void){
...
@@ -16,30 +16,58 @@ int main(void){
}
}
int
sisestus
(
const
char
tekst
[
40
],
char
a
[
20
],
char
b
[
20
],
char
c
[
20
],
char
d
[
20
]){
int
sisestus
(
const
char
tekst
[
40
],
char
a
[
20
],
char
b
[
20
],
char
c
[
20
],
char
d
[
20
]){
int
i
;
printf
(
"%s"
,
tekst
);
printf
(
"%s"
,
tekst
);
scanf
(
"%s"
,
a
);
scanf
(
"%s"
,
a
);
if
(
strlen
(
a
)
==
4
){
if
(
strlen
(
a
)
==
4
){
for
(
i
=
0
;
i
<
strlen
(
a
);
i
++
){
if
(
a
[
i
]
!=
'0'
&&
a
[
i
]
!=
'1'
){
printf
(
"Lubamatu sisend: %s"
,
a
);
return
1
;
}
}
printf
(
"
\n
%s
\n
"
,
a
);
printf
(
"Sisestage teine rida
\n
"
);
printf
(
"Sisestage teine rida
\n
"
);
scanf
(
"%s"
,
b
);
scanf
(
"%s"
,
b
);
if
(
strlen
(
b
)
!=
4
){
if
(
strlen
(
b
)
!=
4
){
printf
(
"Vale!"
);
printf
(
"Vale!"
);
}
}
for
(
i
=
0
;
i
<
strlen
(
b
);
i
++
){
if
(
b
[
i
]
!=
'0'
&&
b
[
i
]
!=
'1'
){
printf
(
"Lubamatu sisend: %s"
,
b
);
return
1
;
}
}
printf
(
"
\n
%s
\n
"
,
b
);
printf
(
"Sisestage kolmas rida
\n
"
);
printf
(
"Sisestage kolmas rida
\n
"
);
scanf
(
"%s"
,
c
);
scanf
(
"%s"
,
c
);
if
(
strlen
(
c
)
!=
4
){
if
(
strlen
(
c
)
!=
4
){
printf
(
"Vale!"
);
printf
(
"Vale!"
);
}
}
for
(
i
=
0
;
i
<
strlen
(
c
);
i
++
){
if
(
c
[
i
]
!=
'0'
&&
c
[
i
]
!=
'1'
){
printf
(
"Lubamatu sisend: %s"
,
c
);
return
1
;
}
}
printf
(
"
\n
%s
\n
"
,
c
);
printf
(
"Sisestage neljas rida
\n
"
);
printf
(
"Sisestage neljas rida
\n
"
);
scanf
(
"%s"
,
d
);
scanf
(
"%s"
,
d
);
if
(
strlen
(
d
)
!=
4
){
if
(
strlen
(
d
)
!=
4
){
printf
(
"Vale!"
);
printf
(
"Vale!"
);
}
}
for
(
i
=
0
;
i
<
strlen
(
d
);
i
++
){
if
(
d
[
i
]
!=
'0'
&&
d
[
i
]
!=
'1'
){
printf
(
"Lubamatu sisend: %s"
,
d
);
return
1
;
}
}
}
}
else
if
(
strlen
(
a
)
==
16
){
else
if
(
strlen
(
a
)
==
16
){
return
0
;
return
0
;
}
}
else
{
else
{
printf
(
"Vale!"
);
printf
(
"Lubamatu sisend: %s"
,
a
);
return
1
;
return
1
;
}
}
return
0
;
return
0
;
...
...
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