Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
siilin
/
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
c92eab4b
authored
7 years ago
by
siilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
41ea79a4
master
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
tunnitöö3.c
tunnitöö3.c
0 → 100644
View file @
c92eab4b
#include <stdio.h>
#include <stdio.h>
int
main
(
void
)
{
int
S
=
0
;
int
i
=
0
;
int
N
=
0
;
// int A = 0;
do
{
printf
(
"Sisesta N:"
);
scanf
(
"%d"
,
&
N
);
}
while
(
N
<=
0
);
int
A
[
N
];
do
{
printf
(
"Sisesta A[%d] : "
,
i
);
scanf
(
"%d"
,
&
A
[
i
]);
i
++
;
if
(
i
<
N
-
1
)
{
i
=
0
;
if
(
A
[
i
]
>
0
)
{
S
=
S
+
A
[
i
];
}
else
{
printf
(
"Arv peab olema positiivne
\n
"
);
}
i
++
;
}
}
while
(
i
<
N
);
printf
(
"S tulemus : %d
\n
"
,
S
);
return
0
;
}
This diff is collapsed.
Click to expand it.
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