Advertisement
KeeganT

Ch4Ex2

Feb 5th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. package ch4ex2;
  2. import java.util.Scanner;
  3.  
  4. public class Ch4Ex2
  5. {
  6.     public static void main(String[] args)
  7.     {
  8.         System.out.print("Enter the diameter of the pizza in inches: ");
  9.         Scanner sc=new Scanner(System.in);
  10.         int inches=sc.nextInt();
  11.         System.out.println("The cost of making the pizza is: $"+(0.05*inches*inches+1.75));
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement