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
9a95ac85
authored
Oct 17, 2017
by
rallui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
48fb6206
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
Tunnitööd/tunnitöö6.c
Tunnitööd/tunnitöö6.c
0 → 100644
View file @
9a95ac85
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
int
main
()
{
int
ReaPikkus
=
50
;
int
VeeruPikkus
=
50
;
int
MinPikkus
=
2
;
int
A
[
ReaPikkus
][
VeeruPikkus
];
int
idx_rida
;
int
idx_veerg
;
int
summa
;
int
arv
=
50
;
do
{
printf
(
"Sisesta veergude arv: "
);
scanf
(
"%d"
,
&
VeeruPikkus
);
}
while
(
VeeruPikkus
<
MinPikkus
);
do
{
printf
(
"Sisesta ridade arv: "
);
scanf
(
"%d"
,
&
ReaPikkus
);
}
while
(
ReaPikkus
<
MinPikkus
);
for
(
idx_rida
=
0
;
idx_rida
<
ReaPikkus
;
idx_veerg
++
)
{
for
(
idx_veerg
=
0
;
idx_veerg
<
VeeruPikkus
;
idx_veerg
++
)
{
A
[
idx_rida
][
idx_veerg
]
=
rand
()
%
arv
-
(
arv
/
2
);
printf
(
" %d "
,
A
[
idx_rida
][
idx_veerg
]);
}
printf
(
"
\n
"
);
}
for
(
idx_veerg
=
0
;
idx_veerg
<
VeeruPikkus
;
idx_rida
++
)
{
for
(
idx_rida
=
0
;
idx_rida
<
ReaPikkus
;
idx_rida
++
)
}
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