Skip to content

Instantly share code, notes, and snippets.

View ubshreenath's full-sized avatar

Sreenath H B ubshreenath

View GitHub Profile
@ubshreenath
ubshreenath / PrimeNumber.java
Created February 10, 2021 16:51
A Java code to check whether a number is prime or not...
import java.io.*;
class PrimeNumber
{
public static void main(String args[])throws IOException
{
BufferedReader ob = new BufferedReader (new InputStreamReader (System.in));
int i,j=2;
System.out.println("Enter the number you want to check whether its prime or not...");
i=Integer.parseInt(ob.readLine());
if (i == 0)