Java Program to Check whether a Number is Prime or Not

preview_player
Показать описание
Write a java program to check whether a number is prime or not. In this tutorial, you are going to learn three ways to check whether an input number is prime or not.

Рекомендации по теме
Комментарии
Автор

This will fail when n = 9... Output will be true but expected output should be false.... loop should go from 2 to sqrt(n) inclusive....

shefalimunjal