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.io.IOException; | |
import java.math.BigInteger; | |
import java.nio.file.Paths; | |
import java.util.Scanner; | |
// Method using BigInteger's built in BigInteger.gcd(BigInteger) method | |
public class Fractions { | |
public static void main(String[] args) { | |
try(Scanner scan = new Scanner(Paths.get("Inputs", "nofluff", "Fractions.in"))) { |
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.io.File; | |
import java.io.IOException; | |
import java.util.Scanner; | |
public class SentenceReversal { | |
public static void main(String[] args){ | |
// Initialize Scanner using Try-With-Resources to AutoClose Scanner | |
// Opens file at ./inputs/SentenceRev.in | |
try(Scanner scanner = new Scanner(new File("inputs", "SentenceRev.in"))){ |
NewerOlder