import java.util.Scanner;

class Sep24 {
	public static void main(String[] args) {

		Scanner kb = new Scanner(System.in);

		// lab #3

		int i = 1;
		while(i <= 100000) {
			if(i % 1000 == 0) {
				System.out.printf("%d ", i);
			}		
			i++;
		}
		System.out.println();


		// lab #4
		int sum = 0;
		int count = 0;
		int input = 1;

		while(input != 0) {
			System.out.print("Enter integer: ");
			input = kb.nextInt();

			sum = sum + input;
			
			if(input != 0) {
				count = count + 1;
			}
		}	

		if (count == 0) {
			return;
		}

		double meanAverage = sum / (double) count;
		System.out.printf("mean: %f\n", meanAverage);

		// break and continue keywords


		i = 1;
		while (i <= 100) {
	
			if (i % 2 == 0) {
				i++;
				continue;
			}		
	
			System.out.printf("%d ", i);
			i++;

			if (i > 5) {
				break;
			}

		}
		System.out.println();

		// for-loop that prints 1 - 5 (inclusively)

		for(i = 1; i <= 5; i++) {
			System.out.printf("%d ", i);
		}
		System.out.println();
		


	}
}
