Last active
December 25, 2015 00:29
-
-
Save joeyv/6888006 to your computer and use it in GitHub Desktop.
A simple program to pizza
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); | |
//inport number | |
size = scan.nextDouble(); | |
//Directions | |
System.out.print ("\tEnter the diameter of the pizza in inches:"); | |
//Caculate cost | |
cost = ((.05 * size * size) + .75 + 1); | |
System.out.println ("\nThe cost of making your pizza is: $" + cost); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fucking gay, lol.