Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
projekt 1
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Patryk Waracki
projekt 1
Commits
edb69da4
Commit
edb69da4
authored
1 week ago
by
Patryk Waracki
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
f35e54e9
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lab_sixx.c
+38
-0
38 additions, 0 deletions
lab_sixx.c
with
38 additions
and
0 deletions
lab_sixx.c
0 → 100644
+
38
−
0
View file @
edb69da4
#include
<stdio.h>
int
sum_tablica
(
int
tablica
[],
int
rozmiar
)
{
int
suma
=
0
;
for
(
int
j
=
0
;
j
<
rozmiar
;
j
++
)
{
suma
+=
tablica
[
j
];
}
return
suma
;
}
int
main
()
{
int
rozmiar
;
printf
(
"podaj rozmiar tabeli"
);
scanf
(
"%d"
,
&
rozmiar
);
printf
(
"podaj wartosci tabeli"
);
int
tablica
[
rozmiar
];
for
(
int
i
=
0
;
i
<
rozmiar
;
i
++
)
{
scanf
(
"%d"
,
&
tablica
[
i
]);
}
int
s
=
sum_tablica
(
tablica
,
rozmiar
);
printf
(
"suma tebeli:%d"
,
s
);
printf
(
"tabela:"
);
for
(
int
i
=
0
;
i
<
rozmiar
;
i
++
)
{
printf
(
"%d"
,
tablica
[
i
]);
}
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment