Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
devops-workshop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Show more breadcrumbs
Stian Andersen Negård
devops-workshop
Commits
178ce525
Commit
178ce525
authored
5 years ago
by
Stian Andersen Negård
Browse files
Options
Downloads
Patches
Plain Diff
jarra
parent
df4998e6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#72196
passed
5 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/resources/CalculatorResource.java
+4
-4
4 additions, 4 deletions
src/main/java/resources/CalculatorResource.java
with
4 additions
and
4 deletions
src/main/java/resources/CalculatorResource.java
+
4
−
4
View file @
178ce525
...
...
@@ -52,7 +52,7 @@ public class CalculatorResource {
*/
public
int
sum
(
String
expression
){
String
[]
split
=
expression
.
split
(
"[+]"
);
int
length
=
split
.
length
()
;
int
length
=
split
.
length
;
int
sum
=
0
;
for
(
int
i
=
0
;
i
<
length
;
i
++){
...
...
@@ -69,7 +69,7 @@ public class CalculatorResource {
*/
public
int
subtraction
(
String
expression
){
String
[]
split
=
expression
.
split
(
"[-]"
);
int
length
=
split
.
length
()
;
int
length
=
split
.
length
;
int
result
=
0
;
for
(
int
i
=
0
;
i
<
length
;
i
++){
...
...
@@ -81,7 +81,7 @@ public class CalculatorResource {
public
int
multiplication
(
String
expression
){
String
[]
split
=
expression
.
split
(
"[*]"
);
int
length
=
split
.
length
()
;
int
length
=
split
.
length
;
int
result
=
0
;
for
(
int
i
=
0
;
i
<
length
;
i
++){
...
...
@@ -93,7 +93,7 @@ public class CalculatorResource {
public
int
division
(
String
expression
){
String
[]
split
=
expression
.
split
(
"[/]"
);
int
length
=
split
.
length
()
;
int
length
=
split
.
length
;
int
result
=
0
;
for
(
int
i
=
0
;
i
<
length
;
i
++){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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