资 源 简 介
Prime Numbers
Business-Logic Requirements:
Program should find prime numbers which are smaller or equal to the inputted from keyboard integer number. Prime numbers - integral numbers that are not evenly divisible by any other numbers except for themselves and 1. For example, for input number 6, the output of the program should be: [2, 3, 5].
Implementation Requirements:
The program should use next two nested loops and the modulus operator (%) to detect prime numbers
The program should expected input from the keyboard and show output to the screen
2. Arrays - neighbouring numbers
Business-Logic Requirements:
Find two neighbouring numbers in an array with the smallest distance to each other. The index of the first number should be outputted to the screen. For example, in the sequence 4 8 6 1 2 9 4 the minimum distance is 1 (between 1 and 2). The function should return the index 3 (of number 1).
If ecxists more than one decision shou