Need a programm:
The program asks for a integer number. If its a prime number then it has to say „Prime number“.If its not then the programm has to say „number -(inserted number)- is not a prime number and divides with: …“. It has to say ALL the numbers the inserted number divides with.
1
Expert's answer
2017-02-18T14:25:16-0500
import java.util.Scanner;
public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in);
System.out.print("Please, enter a positive integer number: "); int num = input.nextInt();
Comments
Leave a comment