5. a The following program checks if a given number is a prime number or not. Generalise the program to display the prime numbers in a given range of numbers. //Program to check if a given number greater than 2 is a prime number or not. public class Prime { public static void main(int no) { int i = no, flag = 0; for(int j = 2; j ==0)
Answers
Answered by
1
Explanation:
81 }; int n = 5; for (int i = 0; i < n; i = i + 1) { for (int j = 0; j < n; j = j + 1) { if (arr[i] % cat[j] == 0) { int temp = arr[j];
Similar questions