working java code:
/* package whatever; // don't place package name! */
import java.util.*; import java.lang.*; import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */ class Ideone { public static void main (String[] args) throws java.lang.Exception { Scanner input = new Scanner(System.in); System.out.print("Number: "); double num = input.nextDouble(); double minimum = num; double maximum = XXX; XXXXXX.out.XXXXX("XXXXXX: "); while (XXXXX.hasNextDouble()) { System.out.print("Number: "); num = input.nextDouble(); XX (XXX < XXXXXXX) { minimum = num; } XXXX if (num &XX; maximum) { XXXXXXX = XXX; } } XXXXXX.out.println("Smallest number: " + XXXXXXX); System.out.XXXXXXX("Largest XXXXXX: " + XXXXXXX); input.XXXXX(); } }
X)
/* XXXXXXX XXXXXXXX; // don't XXXXX package XXXX! */
import XXXX.util.*; XXXXXX java.lang.*; XXXXXX XXXX.XX.*;
/* Name of XXX XXXXX has XX be "Main" XXXX XX the class is XXXXXX. */ class XXXXXX { public static XXXX main (String[] XXXX) throws java.lang.XXXXXXXXX { Scanner input = new XXXXXXX(XXXXXX.in); int XXXXXXX = X; int XXXXXXXX = 0; XXXXXX.out.print("Number: "); while (XXXXX.hasNextDouble()) { XXXXXX input_number = input.XXXXXXXXXX(); if (input_number % 2 == 0) { XXXXXXXX += X; } XXXX { num_odd += X; } System.out.print("XXXXXX: "); } XXXXX.close(); System.out.XXXXXXX("XXX numbers: " + num_odd); XXXXXX.out.XXXXXXX("XXXX XXXXXXX: " + num_even); } }
3)
/* XXXXXXX whatever; // XXX't XXXXX XXXXXXX name! */
XXXXXX java.util.*; import java.XXXX.*; import java.io.*;
/* XXXX XX the XXXXX has XX be "XXXX" XXXX if XXX XXXXX XX XXXXXX. */ XXXXX XXXXXX { XXXXXX XXXXXX XXXX main (XXXXXX[] args) throws XXXX.lang.Exception { Scanner XXXXX = new Scanner(System.in); XXXXXX.out.print("XXXXXXX: "); double XXX = 0; String sum_out = ""; XXXXX (input.hasNextDouble()) { XXXXXX input_number = XXXXX.XXXXXXXXXX(); XXX += XXXXXXXXXXXX; sum_out += XXXXXX.format("%s ", XXXXXX.XXXXXXX(sum)); } input.XXXXX(); System.out.println(XXXXXXX); } }
working java XXXX
/* XXXXXXX XXXXXXXX; // don't place package XXXX! */
import XXXX.util.*; import java.XXXX.*; import XXXX.io.*;
/* XXXX of the XXXXX XXX XX be "Main" XXXX if XXX XXXXX is public. */ XXXXX XXXXXX { XXXXXX XXXXXX XXXX main (XXXXXX[] XXXX) XXXXXX XXXX.XXXX.XXXXXXXXX { Scanner XXXXX = new XXXXXXX(XXXXXX.in); String chk_duplicates = ""; System.out.XXXXX("XXXXXX: "); XXXXXX input_number = input.nextDouble(); double XXXXXXXX = XXXXXXXXXXXX; XXXXXXX XXXXXXXXX = true; while (XXXXX.hasNextDouble()) { XXXXXX.out.XXXXX("XXXXXX: "); XXXXXXXXXXXX = XXXXX.nextDouble(); XX (first_num != XXXX && XXXXXXXXXXXX == prev_num) { XXXXXXXXXXXXXX += String.XXXXXX("%s ", input_number); } XXXXXXXXX = false; prev_num = XXXXXXXXXXXX; } XXXXX.XXXXX(); System.out.println(chk_duplicates); } }