This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Lakes { | |
public static void main (String [] args){ | |
Scanner input = new Scanner (System.in); | |
System.out.println("What is the structure of the lake ? Use 'd' for down , 'u' for up, and 'h' for horizontal"); | |
String lake = input.nextLine(); | |
String [] lakeArray = lake.split(""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class HeadAndTails { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
System.out.println(" Write down the results from fliping the coin, separated by coma: 'H' for heads win, 'T' for tails win "); | |
String result = input.nextLine(); | |
String [] resultArray = result.split(","); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class GameOfBotles { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
System.out.println("How many botles are on the field? "); | |
int n = input.nextInt(); | |
int stepsX = 0; |
NewerOlder