Assignemnt #33, What if

Code

      /// Name: Alex Pinder
      /// Period: 5
      /// Program Name: What if
      /// File Name: WhatIf.java
      /// Date Complete: 10/16/15
      
      public class WhatIf
      {
      	public static void main( String[] args )
      	{
      		int people = 30;
      		int cats = 30;
      		int dogs = 15;
      
      		if ( people < cats )
      		{
      			System.out.println( "Too many cats!  The world is doomed!" );
      		}
      
              /// I think that if means that the code only runs if the statement in the paraentheses is correct. Ihe curly brackets are for the code that is run if the statement is true.
              
      		if ( people > cats )
      		{
      			System.out.println( "Not many cats!  The world is saved!" );
      		}
      
      		if ( people < dogs )
      		{
      			System.out.println( "The world is drooled on!" );
      		}
      
      		if ( people > dogs )
      		{
      			System.out.println( "The world is dry!" );
      		}
      
      		dogs += 5;
      
      		if ( people >= dogs )
      		{
      			System.out.println( "People are greater than or equal to dogs." );
      		}
      
      		if ( people <= dogs )
      		{
      			System.out.println( "People are less than or equal to dogs." );
      		}
      
      		if ( people == dogs )
      		{
      			System.out.println( "People are dogs." );
      		}
      	}
      }
    

Picture of the output

Assignment 33