Assignemnt #11 Numbers And Math

Code

   
    /// Name: Jake Johnson
    /// Period: 7
    /// Program Name: Numbers And Math
    /// File Name: NumbersAndMath.java
    /// Date Finished: 9/10/2015
    public class NumbersAndMath
{
    public static void main ( String[] args)
    {
// + plus
// - minus
// / slash
// * asterisk
// % percent
// < less-than
// > greater-than
// <= less-than-or-equal
// >= greater-than-or-equal
        System.out.println( "I will now count my chickens:" ); //Prints that I will now count my chickens

		System.out.println( "Hens " + ( 25.00 + 30.00 / 6.00 ) ); //counts hens by adding 25 and 30 and dividing by 6
		System.out.println( "Roosters " + ( 100.00 - 25.00 * 3.00 % 4.00 ) ); //counts roosters by doing 100-25*3 and 4 remainder

		System.out.println( "Now I will count the eggs:" );//prints that I will now count my eggs

		System.out.println( 3.00 + 2.00 + 1.00 - 5.00 + 4.00 % 2.00 - 1.00 / 4.00 + 6.00 ); //3+2+1-4+4 remainder of 2 -1 /4+6

		System.out.println( "Is it true that 3 + 2 < 5 - 7?" );//prints the question whether 5 < -2

		System.out.println( 3.00 + 2.00 < 5.00 - 7.00 );//calculates if that is true or false and prints it

		System.out.println( "What is 3 + 2? " + ( 3.00 + 2.00 ) ); //3+2
		System.out.println( "What is 5 - 7? " + ( 5.00 - 7.00 ) ); //5-7

		System.out.println( "Oh, that's why it's false." );//prints thats why its false

		System.out.println( "How about some more." ); //prints how about some more

		System.out.println( "Is it greater? " + ( 5.00 > -2.00 ) ); //prints whether or not it is greater
		System.out.println( "Is it greater or equal? " + ( 5.00 >= -2.00 ) ); //prints whether or not it is greater or equal
		System.out.println( "Is it less or equal? " + ( 5.00 <= -2.00 ) ); //prints whether or not it is less or equal
    }
}

    

Picture of the output

This should work