This file contains hidden or 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 geoMean { | |
public static void main(String[] args) { | |
System.out.print("Enter number 1: "); | |
Scanner intInput = new Scanner (System.in); | |
double number1 = intInput.nextDouble(); | |
System.out.print("Enter number 2: "); |
This file contains hidden or 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 checkUPCDigits { | |
public static int[] splitNumberIntoArray(long NumberToBeSplit){ | |
int i = 0; | |
int[] Array = new int[12]; | |
int lastDigit; | |
while (NumberToBeSplit > 0){ |
This file contains hidden or 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
public class Vector { | |
private double x; | |
private double y; | |
public Vector (double x, double y){ | |
this.x = x; | |
this.y = y; | |
} | |
public double getX () { |
This file contains hidden or 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.Arrays; | |
import java.util.Scanner; | |
public class UniqueInts { | |
public static void main(String[] args) { | |
final int TOTAL_INTS = 10; | |
Scanner input = new Scanner(System.in); | |
This file contains hidden or 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 TicTacToe { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
char[][] grid = new char[3][3]; | |
//initialize array |
This file contains hidden or 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.Arrays; | |
import java.util.Scanner; | |
public class Occurrences { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
System.out.println("How many numbers will you enter? "); | |
int entries = in.nextInt(); |
This file contains hidden or 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; | |
import java.util.Arrays; | |
public class IntSort { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
//How many numbers to sort | |
int totalnums = 3; |
This file contains hidden or 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 Divby5or6 { | |
public static void main(String[] args) { | |
System.out.print("Enter A Number: "); | |
Scanner input = new Scanner(System.in); | |
int number = input.nextInt(); | |
boolean divisibleBy5 = (number % 5 == 0); |
This file contains hidden or 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 TriangleDetector { | |
public static void main(String[] args) { | |
System.out.print("Enter Edge 1: "); | |
Scanner input = new Scanner(System.in); | |
int e1 = input.nextInt(); | |
This file contains hidden or 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 Feet2Meters { | |
public static void main(String[] args) { | |
System.out.print("Enter distance in feet (ft): "); | |
Scanner input = new Scanner(System.in); | |
double feet; | |
feet = input.nextDouble(); |