Skip to content

Instantly share code, notes, and snippets.

@joeyv
joeyv / Dice.java
Created October 18, 2013 16:57
Roll two dice
import java.util.*;
public class Dice
{
public static void main(String []args)
{
int die1, die2;
// Random number generator
Random generator = new Random();
@joeyv
joeyv / Change.java
Created October 11, 2013 17:34
Simple program to calculate change .
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;
@joeyv
joeyv / Pizza.java
Last active December 25, 2015 00:29
A simple program to pizza
import java.util.Scanner;
public class Pizza
{
public static void main (String[] args)
{
double size;
double cost;
Scanner scan = new Scanner(System.in);
@joeyv
joeyv / BirthdayGame.java
Last active December 25, 2015 00:29
Simple program to make your friends think your smart.
import java.util.Scanner;
public class Birthday
{
public static void main (String[] args)
{
double number;
double birthday;
Scanner scan = new Scanner(System.in);
@joeyv
joeyv / Weight.java
Last active December 24, 2015 14:29
A simple program to calculate your ideal weight based off of your height.
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;
@joeyv
joeyv / Dank.java
Created October 1, 2013 17:34
A dank program to calculate how many gallons of paint you will need to paint a room
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;