Padd Solutions

Converted by Falcon Hive

import java.util.Scanner;

public class Pizza
{
    public static void main (String[] args)
    {
        Scanner myScanner = new Scanner (System.in);
       
        System.out.print ("How much money do you have? ");
       
        //Scan for the money they have
        int poss = myScanner.nextInt ();
       
        //If they have at least $4, ask if they'd like to buy some pizza.
        if (poss >= 4)
        {
            System.out.println ("Would you like to purchase pizza, my rich highness?");
        }
       
        //else will come first
        else if (poss >= 1)
        {
            System.out.println ("How about a cup of dirt, you poor bastard?");
        }
       
        //If they have less than $4, tell them they're poor.
        else
        {
            System.out.println ("You're poor. GTFO!!!");
        }
    }
}

       

(0) Comments

Post a Comment