Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
Języki programowania
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
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
Jakub Walas
Języki programowania
Commits
fd95a126
Commit
fd95a126
authored
1 week ago
by
Jakub Walas
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
51c49883
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lab6/lab6zad1.c
+23
-0
23 additions, 0 deletions
lab6/lab6zad1.c
with
23 additions
and
0 deletions
lab6/lab6zad1.c
0 → 100644
+
23
−
0
View file @
fd95a126
#include
<stdio.h>
int
suma
(
int
a
[],
int
n
){
int
b
,
c
;
c
=
0
;
for
(
b
=
0
;
b
<=
n
-
1
;
b
++
){
c
=
c
+
a
[
b
];
}
return
c
;
}
int
main
(){
int
n
,
s
;
printf
(
"Podaj wielkosc tablicy
\n
"
);
scanf
(
"%i"
,
&
n
);
int
a
[
n
],
i
;
for
(
i
=
0
;
i
<=
n
-
1
;
i
++
){
printf
(
"Podaj %i skladnik tablicy
\n
"
,
i
+
1
);
scanf
(
"%i"
,
&
a
[
i
]);
}
s
=
suma
(
a
,
n
);
printf
(
"Wszystkie skladniku po sumowaniu daja %.i
\n
"
,
s
);
}
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