Can you write java program for prime number 1to 50 and skip printing 30 and 40 numbers
package BasicCoreJavaExamples;import java.util.Scanner;public class PrintPrimeNumbers { public static void main(String[] args) { Scanner src = new Scanner(System.in); System.out.println(“Enter prime number till to :”); int lastNum = src.nextInt(); int count = 0; if (lastNum == 0 || lastNum == 1) { System.out.println(“The given numbers are nor prime number.”); } for (int i = 2; i <=…
Read More “Can you write java program for prime number 1to 50 and skip printing 30 and 40 numbers” »