Question: using this code below i need a function to check whether a given integer is a prime number or not . use break to break
3 import java.util.Scanner; 4 public class NestedLoops public static void main(String[] args) { 27 TODO Auto-generated method Stub 9 Scanner inp - new Scanner(System.in); te 12 System.out.print("Please enter a number greater than 2 : 12 19 int number Inp.nextInt(; 14 15 displayMultTablet number: 16 19 18 for(int 12; 1
Step by Step Solution
There are 3 Steps involved in it
To add a function that checks whether a given integer is a prime numb... View full answer
Get step-by-step solutions from verified subject matter experts
