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
522fa840
authored
Nov 28, 2017
by
rallui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
8474d67f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
Tunnitööd/tunnitoo13.c
Tunnitööd/tunnitoo13.c
0 → 100644
View file @
522fa840
#include <stdio.h>
#include <stdio.h>
#define n 4
#define m 3
int
main
(
void
)
{
int
i
,
j
;
int
negsum
;
int
B
[
n
][
m
]
=
{
{
-
2
,
-
3
,
5
},
{
5
,
6
,
-
5
},
{
11
,
-
2
,
-
3
},
{
-
12
,
-
4
,
5
}
};
while
(
i
<
n
)
{
j
=
0
;
while
(
j
<
m
)
{
printf
(
"[%4d]"
,
B
[
i
][
j
]);
j
++
;
}
printf
(
"
\n
"
);
i
++
;
}
j
=
0
;
printf
(
"
\n
"
);
while
(
j
<
m
)
{
i
=
0
;
negsum
=
0
;
while
(
i
<
n
)
{
if
(
B
[
i
][
j
]
<
0
)
{
negsum
+=
B
[
i
][
j
];
}
i
++
;
}
printf
(
"%4d"
,
negsum
);
j
++
;
}
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