Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ch4ex2;
- import java.util.Scanner;
- public class Ch4Ex2
- {
- public static void main(String[] args)
- {
- System.out.print("Enter the diameter of the pizza in inches: ");
- Scanner sc=new Scanner(System.in);
- int inches=sc.nextInt();
- System.out.println("The cost of making the pizza is: $"+(0.05*inches*inches+1.75));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement