Assignemnt #33

Code

/// Name: Connor Siri
/// Period: 7
/// Program Name: What
/// File Name: What.java
/// Date Finished: 9/30/2015
import java.util.Scanner;
class What{

    public static void main(String[] args) {
    
    int people = 20;
    int cats = 20;
    int dogs = 15;
    
     // if the if statement is true it prints what is below it. if it is false it isn't printed
        //the curly brackets keep each statement seperate from the other
    
    if ( people < cats )
    {
        System.out.println("Too many caats! The world is doomed!" );
    }
    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 dogs.");
    }
    
 
	}
}
    
    

Picture of the output

Assignment2.html