Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
alxm2023
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
alxm2023
Commits
ad0497c9
Commit
ad0497c9
authored
Nov 30, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Zajęcia 30.11.2023 - pierwsze funkcje
parent
6096dd89
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
0 deletions
+74
-0
funkcje1.cpp
20231130/funkcje1.cpp
+25
-0
powtorz.cpp
20231130/powtorz.cpp
+49
-0
No files found.
20231130/funkcje1.cpp
0 → 100644
View file @
ad0497c9
#include <iostream>
using
namespace
std
;
void
aaa
()
{
cout
<<
"aaa, kotki dwa
\n
"
;
cout
<<
"szare bure obydwa
\n
"
;
}
void
wypisz_ocene
(
string
przedmiot
,
int
ocena
)
{
cout
<<
"Z przedmiotu "
<<
przedmiot
<<
" dostajesz ocenę "
<<
ocena
<<
endl
;
}
int
main
()
{
cout
<<
"Poczatek programu
\n
"
;
aaa
();
aaa
();
cout
<<
"================
\n
"
;
wypisz_ocene
(
"matematyka"
,
3
);
wypisz_ocene
(
"informatyka"
,
5
);
return
0
;
}
20231130/powtorz.cpp
0 → 100644
View file @
ad0497c9
#include <iostream>
using
namespace
std
;
void
powtorz_napis
(
string
napis
,
int
ile_razy
)
{
for
(
int
i
=
0
;
i
<
ile_razy
;
i
++
)
{
cout
<<
napis
<<
endl
;
}
}
void
choinka
(
int
wysokosc
)
{
int
ile_gw
=
1
;
int
ile_sp
=
wysokosc
;
for
(
int
i
=
0
;
i
<
wysokosc
;
i
++
)
{
for
(
int
j
=
0
;
j
<
ile_sp
;
j
++
)
{
cout
<<
" "
;
}
for
(
int
j
=
0
;
j
<
ile_gw
;
j
++
)
{
cout
<<
"*"
;
}
cout
<<
endl
;
ile_gw
+=
2
;
ile_sp
-=
1
;
}
}
void
choinka_v2
(
int
wysokosc
)
{
for
(
int
i
=
0
;
i
<
wysokosc
;
i
++
)
{
for
(
int
j
=
0
;
j
<
wysokosc
-
i
;
j
++
)
{
cout
<<
" "
;
}
for
(
int
j
=
0
;
j
<
2
*
i
+
1
;
j
++
)
{
cout
<<
"*"
;
}
cout
<<
endl
;
}
}
int
main
()
{
powtorz_napis
(
"Ala ma kota"
,
5
);
powtorz_napis
(
"Ola ma psa"
,
3
);
choinka
(
5
);
choinka
(
12
);
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