first commit
This commit is contained in:
23
wk/src/practice/alphabeticalOrder.java
Normal file
23
wk/src/practice/alphabeticalOrder.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package practice;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class alphabeticalOrder {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Enter a three letter word:");
|
||||
Scanner in = new Scanner(System.in);
|
||||
String word = in.next();
|
||||
char first = word.charAt(0);
|
||||
char second = word.charAt(1);
|
||||
char third = word.charAt(2);
|
||||
if(first<=second && second<=third){
|
||||
System.out.println("ALPHABETICAL ORDER");
|
||||
} else if(first>=second && second>=third){
|
||||
System.out.println("REVERSE ALPHABETICAL");
|
||||
} else {
|
||||
System.out.println("NOT IN ORDER");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
12
wk/src/practice/excercise2.java
Normal file
12
wk/src/practice/excercise2.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package practice;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class excercise2 {
|
||||
public static void main(String[] args) {
|
||||
Scanner in = new Scanner(System.in);
|
||||
String key = in.next();
|
||||
String direction =
|
||||
|
||||
}
|
||||
}
|
||||
11
wk/wk3day3.iml
Normal file
11
wk/wk3day3.iml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
Reference in New Issue
Block a user