Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
rallui
/
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
f2eaa3f3
authored
Nov 07, 2017
by
rallui
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
6616bb5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
Tunnitööd/praks9.c
Tunnitööd/praks9.c
0 → 100644
View file @
f2eaa3f3
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#define m 5 //maatriksi tulpade arv
//funktsioonide prototüübid
void
GeneeriMassiiv
(
int
n
,
int
M
[
n
][
m
]);
void
RidadeSort
(
int
n
,
int
Massiiv
[
n
][
m
]);
void
PrintMassiiv
(
int
n
,
int
A
[
n
][
m
]);
float
ArvutaReakeskmine
(
int
a
,
int
b
,
int
c
);
void
ArvutaLoppTulemus
(
int
n
,
int
A
[
n
][
m
],
float
T
[
n
]);
void
PrintLoppTulemus
(
int
n
,
float
A
[
n
]);
int
main
(
void
)
{
}
while
(
arv
<
0
||
arv
>
15
)
GenereeriMassiiv
(
arv
,
Tulemused
);
PrintMassiiv
(
arv
,
Tulemused
);
RidadeSort
(
arv
,
Tulemused
);
printf
(
"
\n
\n
"
);
ArvutaLoppTulemus
(
arv
,
Tulemused
,
Yldarvestus
);
printf
(
"
\n
"
);
PrintLoppTulemus
(
arv
,
Yldarvestus
);
return
0
;
}
void
GeneeriMassiiv
(
int
n
,
int
M
[
n
][
m
]);
{
for
(
i
=
0
,
i
<
n
,
i
++
);
{
for
(
j
=
0
,
j
<
15
,
j
++
);
{
Massiiv
[
i
][
j
]
=
rand
()
%
RandSize
;
printf
(
"|%d|"
,
Massiiv
[
i
][
j
]);
)
printf
(
"
\n
"
);
}
}
}
void
PrintMassiiv
(
int
n
;
int
A
[
n
][
m
])
{
int
i
,
j
;
for
(
i
=
0
,
i
<
n
,
i
++
);
{
for
(
j
=
0
,
j
<
15
,
j
++
);
{
printf
(
"|%d|"
,
Massiiv
[
i
][
j
]);
)
printf
(
"
\n
"
);
}
}
}
void
RidadeSort
(
int
n
,
int
Massiiv
[
n
][
m
]);
{
rallui
@rallui
commented
Nov 07, 2017
Master
praks9.c
[praks9.c](/uploads/05d71ab7678e8044b76656aba432d6a1/praks9.c)
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