Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Jürgen Hein
/
iax0583
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3fe12f06
authored
Oct 17, 2024
by
Jürgen Hein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
db5b570e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
Tunnitöö 17.10.24/SymboliteJadaNaide.c
Tunnitöö 17.10.24/SymboliteJadaNaide.c
0 → 100644
View file @
3fe12f06
/* Sisestada sümbolite jada S[] ja see väljastada stringina.*/
/* Sisestada sümbolite jada S[] ja see väljastada stringina.*/
#include <stdio.h>//_________________________________3__
void
sisse
(
char
[],
int
,
char
[]);
//_____________________6__
int
mitu
(
char
[]);
//__________________________________4__
void
valja
(
char
[]);
//________________________________7__
int
main
(
void
)
//_____________________________________1__
{
//_____________________________________1__
int
N
;
//_________________________________________2__
N
=
mitu
(
"Sisestage stringi pikkus"
);
//________3__
char
S
[
N
];
//_______________________________________5__
sisse
(
"Sisestage S "
,
N
,
S
);
//___________________________6__
valja
(
S
);
//________________________________________7__
return
0
;
//________________________________________1__
}
//____________________________________________________1__
void
valja
(
char
cc
[])
//_______________________________8__
{
printf
(
" Sisestatud string %s"
,
cc
);
printf
(
"
\n
"
);
}
void
sisse
(
char
se
[],
int
nn
,
char
ss
[])
//_______________8__
{
int
t
=
0
;;
do
{
printf
(
" %s [%d]
\n
"
,
se
,
t
,
ss
);
scanf
(
"%s"
,
&
ss
[
t
]);
t
++
;
}
while
(
t
<
nn
-
1
);
}
int
mitu
(
char
sel
[])
//________________________________8__
{
int
nn
;
do
{
printf
(
"%s
\n
"
,
sel
);
scanf
(
"%d"
,
&
nn
);
if
(
nn
<
0
)
printf
(
"peab olema > 0 "
);
}
while
(
nn
<=
0
);
return
nn
;
}
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