Big+program+code

code /* Ms. Newell's Computer Science II and III class Started April 14, 2008 The Big Program #1 gets 4 integers from the user and performs a lot of math on the numbers and then outputs the results of all these operations.This program was created by 17 gifted JAVA programmers at South Hadley High School in Massachusetts. // TRex09 will set up the class for this program and get the input. The input will be 4 integers. import java.io.*; public class bigprogram1 {   public static void main(String[] arg) throws IOException {       String strNumber; int input = 0; int num1 = 0; int num2 = 0; int num3 = 0; int num4 = 0; int max = 0; //Get input BufferedReader dataIn = new BufferedReader (new InputStreamReader(System.in)); System.out.println("Please input a 4 digit number:"); strNumber = dataIn.readLine; // Convert input to integer input = Integer.parseInt(strNumber); // Separate digits num4 = input % 10; input = input / 10; num3 = input % 10; input = input / 10; num2 = input % 10; input = input / 10; num1 = input % 10; //Reptar1 will find the maximum and determine if the max is even or odd. // Find Max if(num1 > max) {           max = num1; }       if(num2 > max) {           max = num2; }       if(num3 > max) {           max = num3; }       if(num4 > max) {           max = num4; } //Find Even or Odd and Output if(max % 2 == 0) {           System.out.println("The number " + max + " is even."); }       else {           System.out.println("The number " + max + " is odd."); } //dman2522 will find the value of each number squared and add those. System.out.println("When the 4 numbers are squared and the digits are added together it equals " + ((num1*num1) + (num2*num2) + (num3*num3) + (num4*num4))); /* Terox13 will find the summation of the 4 numbers where int1 and int2 will be the limits of the summation and int3 and int4 will be the summand, where in the equation y = mx + b, int3 will be m and int4 will be b.       int totalSum = 0; for(int i = num1; i <= num2; i++) { totalSum = totalSum + (num3 * i + num4); }       System.out.println("The total summation is " + totalSum); //Computerhacker195 is finding the minimum number of the 4 numbers. int minimum = num1; //sets up an array int []number = new int [4]; number[0] = num1; number[1] = num2; number[2] = num3; number[3] = num4; //forloop to find it       for(int i = 0; i <= 3; i++) {           if(minimum >= number[i]) {               minimum = number[i]; }       } //outputting System.out.println("The minimum is " + minimum); //Saul-Goode will output all the integers added together. System.out.println(num1+num2+num3+num4 + " is all the numbers added together."); //baconisgud will add all the numbers and divide the number by 100, then multiply by 30, //then subtract 3 System.out.println("The numbers are added and the sum is divided by 100, then multiplyed by 30, then 3 is subtracted. "               + ((num1 + num2 + num3 + num4)/100 * 30 - 3)); //tigertackle will do number 1 to the power of number 4, minus number2 to the power of number3. System.out.println("Num1 to the power of Num2 minus Num2 to the power of Num3 = "               + (Math.pow(num1,num4)-Math.pow(num2,num3))); // WB Mason will add numbers 3 and 4 and multiply by numbers 1 plus 2. System.out.println("the sum of numbers 1 and 2 multiplied by the sum of numbers 3 and 4 = "                   + (num3+num4)*(num1+num2));

} }

code