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 Dank | |
{ | |
static Scanner sc = new Scanner(System.in); | |
public static void main(String []args) | |
{ | |
final int ONE_GAL = 350; |
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 Weight | |
{ | |
static Scanner sc = new Scanner(System.in); | |
public static void main(String []args) | |
{ | |
double feet = 0.0, inch = 0.0, height = 0.0, girl = 0.0, man = 0.0; | |
double gper = 0.0, mper = 0.0; |
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 Birthday | |
{ | |
public static void main (String[] args) | |
{ | |
double number; | |
double birthday; | |
Scanner scan = new Scanner(System.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.util.Scanner; | |
public class Pizza | |
{ | |
public static void main (String[] args) | |
{ | |
double size; | |
double cost; | |
Scanner scan = new Scanner(System.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.util.Scanner; | |
public class Change | |
{ | |
public static void main(String []args){ | |
int cent, placeholder; //placeholder is to store the remainder number | |
int quarter, dime, nickel, penny; | |
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.*; | |
public class Dice | |
{ | |
public static void main(String []args) | |
{ | |
int die1, die2; | |
// Random number generator | |
Random generator = new Random(); |
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.*; | |
public class Lottery | |
{ | |
public static void main(String []args) | |
{ | |
// 6 Lottery numbers | |
int num1, num2, num3, num4, num5, num6; | |
// Random number generator |
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.*; | |
public class Phone | |
{ | |
public static void main(String[] args) | |
{ | |
int num1, num2, num3; //3 numbers in area code | |
int set2, set3; //sequence 2 and 3 of the phone number | |
Random generator = new Random(); |
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 StringManips | |
{ | |
public static void main (String[] args) | |
{ | |
String phrase = new String ("This is a String test."); | |
int phraseLength; // number of characters in the phrase String | |
int middleIndex; // index of the middle character in the String | |
String firstHalf; // first half of the phrase String |
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 Cubes | |
{ | |
public static void main(String[] args) | |
{ | |
// Declare variables | |
double cube1, cube2; | |
double sum; | |
OlderNewer