I'm a bit confused on what you want, do you want to output a list of prime numbers whose range is upto the input or check if the input is a prime number or something else entirely?

Ok, so you need, if, for example, 5 is inputed, to show you 7, and if 7 is inputed to shouw you 11, and so on and so forth.
Well, we'll need a proof that you tried to solve your problem, so that we know where you're stuck. Post what you've done so far:).

i'm not stuck enywhere, just need to know formula or smth,i'm using just prime numbers identification
for (i = 2; i<=sqrt(n); i++)}
if (n % i == 0); // If i divides n evenly,*

Hello, am working on a program for the U.S. Department of Labor. I am working on two programs for the state of Oregon, and the program that reads data and ...

package grossmontbank;
import java.util.Scanner;
public class GrossmontBank
{
//class variables (global - accessible throughout this class)
//scanner object to be used throughout
private static Scanner input = new Scanner(System.in);
//array ...