Assignemnt #12

Code

    /// Name: Ryan Volko
    /// Period: 7
    /// Program Name: Ninth Program
    /// File Name: NinthProg.java
    /// Date Finished: 9/8/2015

    public class NinthProg{

        public static void main( String[] args )
    {
        int people, computers, empty_computers, cost_per_computer;
        double cost_per_person;
        
        people = 30;
        computers= 44;
        empty_computers = computers - people;
        cost_per_computer = 5000;
        cost_per_person = cost_per_computer / people;
        
        //This should just print 30 for me
        System.out.println( "There are " + people + " in the class." );
        //This should just print 44 for me
        System.out.println( "There are " + computers + " in the class." );
        //This should do the math 44-30 for me
        System.out.println( "There will be " + empty_computers + " empty computers." );
        //This should print 5000
        System.out.println( "The cost of a computer is " + cost_per_computer + " dollars." );
        //This should do the math 5000/30
        System.out.println( "Everyone needs to pay " + cost_per_computer / people + " dollars to keep the class going.");
        
        }
    }
    

Picture of the output

Assignment 9