Saturday, 29 November 2014

Program to find a prime number in java

import java.util.Scanner;


public class SB

{




public static void main(String[] args) {
System.out.println("Enter the limit uptoo which you want to print prime no.");
int in = new Scanner(System.in).nextInt();
int limit =in;
for (int i = 2; i <=limit; i++) {


 For further visit    Javainhouse

You may like :

Design Pattern in  java

Java Coding Interview Questions

No comments:

Post a Comment