Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
20231104-KursPodstawowyALX
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
20231104-KursPodstawowyALX
Commits
ca22942c
Commit
ca22942c
authored
Nov 05, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
poprawka teorii
parent
58294d81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
TeoriaIf.java
src/main/java/p04_if/TeoriaIf.java
+4
-4
No files found.
src/main/java/p04_if/TeoriaIf.java
View file @
ca22942c
...
...
@@ -20,10 +20,10 @@ public class TeoriaIf {
// Jeśli za if-em lub else-em do wykonania jest tylko jedna instrukcja,
// to teoretycznie nie trzeba brać jej w nawiasy klamrowe
if
(
liczba
%
2
==
0
)
System
.
out
.
println
(
"liczba jest parzysta"
);
else
System
.
out
.
println
(
"liczba jest nieparzysta"
);
if
(
liczba
%
2
==
0
)
System
.
out
.
println
(
"liczba jest parzysta"
);
else
System
.
out
.
println
(
"liczba jest nieparzysta"
);
// Ale ze względu na czytelność kodu oraz perspektywę dalszej modyfikacji
// lepiej od początku stosować nawiasy klamrowe.
...
...
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