Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Programming Work
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
charlotte.kerr
Programming Work
Commits
39d1b9ca
Commit
39d1b9ca
authored
Oct 08, 2020
by
Charlotte Kerr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to code
parents
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
0 deletions
+105
-0
.classpath
.classpath
+10
-0
.gitignore
.gitignore
+1
-0
.project
.project
+17
-0
org.eclipse.jdt.core.prefs
.settings/org.eclipse.jdt.core.prefs
+12
-0
expressions.java
src/week03/expressions.java
+65
-0
No files found.
.classpath
0 → 100644
View file @
39d1b9ca
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"
>
<attributes>
<attribute
name=
"module"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
.gitignore
0 → 100644
View file @
39d1b9ca
/bin/
.project
0 → 100644
View file @
39d1b9ca
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
week03
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.jdt.core.javanature
</nature>
</natures>
</projectDescription>
.settings/org.eclipse.jdt.core.prefs
0 → 100644
View file @
39d1b9ca
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
src/week03/expressions.java
0 → 100644
View file @
39d1b9ca
package
week03
;
import
java.util.Scanner
;
public
class
expressions
{
public
static
void
main
(
String
[]
args
)
{
// TODO Auto-generated method stub
/*
int a = 2, b = 2, c = 2, d = 2, e = 2, f = 2, x = 3;
System.out.println("a++ = " + (a++));
System.out.println("b-- = " + (b--));
System.out.println("c+=b = " + (c+=b));
System.out.println("d-=b = " + (d-=b));
System.out.println("e*=b = " + (e*=b));
System.out.println("f/=b = " + (f/=b));
System.out.println("5%3 = " + (5%3));
Scanner input = new Scanner(System.in);
System.out.println("Enter the numerator:");
int num1 = input.nextInt();
System.out.println("Enter the denominator:");
int num2 = input.nextInt();
if ((num1%num2)==0) {
System.out.println("Your numerator is divisible.");
}
else {
System.out.println("Your numerator is not divisible.");
}
*/
System
.
out
.
println
(
"Enter your first number:"
);
int
num3
=
input
.
nextInt
();
System
.
out
.
println
(
"Enter your second number:"
);
int
num4
=
input
.
nextInt
();
*/
System
.
out
.
println
(
"Multiples of 3 from 31 to 0."
);
System
.
out
.
println
();
for
(
int
i
=
31
;
i
>=
1
;
i
--)
{
if
(
i
%
3
!=
0
)
{
continue
;
}
System
.
out
.
println
(
i
);
}
for
(
int
i
=
1
;
i
<=
10
;
i
++)
{
// Only shows numbers 1-5.
if
(
i
>
5
)
break
;
System
.
out
.
println
(
i
);
}
for
(
int
i
=
1
;
i
<=
10
;
i
++)
{
// Only shows numbers 6-10.
if
(
i
<=
5
)
{
continue
;}
System
.
out
.
println
(
i
);
}
}
}
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