Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
sameis
/
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
1affe2a9
authored
Sep 26, 2017
by
sameis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tunnitöö2
parent
73f4e9c8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
PR4/matrix.c
PR4/matrix.c
0 → 100644
View file @
1affe2a9
#include <stdio.h>
int
pea
=
0
;
int
k6rv
=
0
;
int
i
=
0
;
int
A
[
4
][
4
]
=
{{
2
,
3
,
-
4
,
3
},
{
1
,
2
,
-
3
,
0
},
{
1
,
2
,
3
,
4
},
{
1
,
2
,
3
,
4
}};
int
main
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<=
3
;
i
++
)
{
pea
+=
A
[
i
][
i
];
k6rv
+=
A
[
0
+
i
][
3
-
i
];
}
if
(
pea
<
k6rv
)
{
printf
(
"Peasumma on %d
\n
"
,
pea
);
printf
(
"K6rvalsumma on %d
\n
"
,
k6rv
);
}
else
{
printf
(
"Peasumma on %d
\n
"
,
pea
);
printf
(
"K6rvalsumma on %d
\n
"
,
k6rv
);
}
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