Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Assessment YSJ
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
romain.vasseur
Assessment YSJ
Commits
bd6475e2
Commit
bd6475e2
authored
Nov 07, 2018
by
Romain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Part One
parent
7b0cb082
Pipeline
#249
canceled with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
AssessmentPartOne.java
src/AssessmentPartOne.java
+12
-2
Hub.java
src/Hub.java
+1
-0
No files found.
src/AssessmentPartOne.java
View file @
bd6475e2
...
...
@@ -7,7 +7,7 @@ public class AssessmentPartOne {
// Debug this method so it passes the unit test.
// Add comments beside any changes you make
if
(
num1
<
num2
)
//
if
(
num1
>
num2
)
// replace < by >
{
if
(
num3
>
num1
)
{
...
...
@@ -26,7 +26,7 @@ public class AssessmentPartOne {
}
else
{
return
num2
;
return
num2
;
// add ";" after num2
}
}
}
...
...
@@ -43,6 +43,16 @@ public class AssessmentPartOne {
// You should comment your code explaining what each part does
int
sumOfSquares
=
0
;
if
(
start
+
1
<
end
&&
start
>=
0
)
{
for
(
int
i
=
start
+
1
;
i
<
end
;
i
++)
// loop i=start+1 because start is not included and i<end because we add the last number before end
{
sumOfSquares
=
sumOfSquares
+
i
;
}
}
else
{
sumOfSquares
=-
1
;
}
return
sumOfSquares
;
...
...
src/Hub.java
View file @
bd6475e2
...
...
@@ -4,6 +4,7 @@ public class Hub {
public
static
void
main
(
String
[]
args
)
{
// TODO Auto-generated method stub
}
}
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