Click here to Skip to main content
15,893,588 members
Home / Discussions / Java
   

Java

 
AnswerRe: Why the record cannot insert into MS access Pin
PIEBALDconsult14-Nov-14 5:55
mvePIEBALDconsult14-Nov-14 5:55 
GeneralRe: Why the record cannot insert into MS access Pin
jdzgray14-Nov-14 6:13
jdzgray14-Nov-14 6:13 
AnswerRe: Why the record cannot insert into MS access Pin
jschell14-Nov-14 12:18
jschell14-Nov-14 12:18 
AnswerRe: Why the record cannot insert into MS access Pin
Member 1074002029-Nov-14 23:45
Member 1074002029-Nov-14 23:45 
QuestionConnection between Oracle Jdeveloper and MS ACcess Pin
Tufail Ahmad13-Nov-14 18:54
Tufail Ahmad13-Nov-14 18:54 
AnswerRe: Connection between Oracle Jdeveloper and MS ACcess Pin
Richard MacCutchan13-Nov-14 22:05
mveRichard MacCutchan13-Nov-14 22:05 
AnswerRe: Connection between Oracle Jdeveloper and MS ACcess Pin
jschell14-Nov-14 12:21
jschell14-Nov-14 12:21 
QuestionTo correct code Pin
Faisal Hafeez Mughal13-Nov-14 3:54
Faisal Hafeez Mughal13-Nov-14 3:54 
C#
import java.util.Scanner;
public class ses
{

    public static void main(String args[])
     {
        int i=0, n=0,p=0,j;
        Scanner s=new Scanner(System.in);
                p=1;
            while(n!=p)
            {

            System.out.print("Enter a numbner");
            n=s.nextInt();
            if(p==1 &&n==p)
                break;
        for(j=2;j<=n/2;j++)

        {

            if(((i%j)==0)&& j!=1)
        {
            p=0;
            break;

        }


        }


        }

    }


}

I want that program accept valeus from user until a prime number is pressed but there is a problem in that code it don`t stop after entering three or two value .
GeneralRe: To correct code Pin
PIEBALDconsult13-Nov-14 4:27
mvePIEBALDconsult13-Nov-14 4:27 
AnswerRe: To correct code Pin
Richard MacCutchan13-Nov-14 4:40
mveRichard MacCutchan13-Nov-14 4:40 
GeneralRe: To correct code Pin
PIEBALDconsult13-Nov-14 4:47
mvePIEBALDconsult13-Nov-14 4:47 
GeneralRe: To correct code Pin
Richard MacCutchan13-Nov-14 5:13
mveRichard MacCutchan13-Nov-14 5:13 
GeneralRe: To correct code Pin
PIEBALDconsult13-Nov-14 5:20
mvePIEBALDconsult13-Nov-14 5:20 
GeneralRe: To correct code Pin
Richard MacCutchan13-Nov-14 5:35
mveRichard MacCutchan13-Nov-14 5:35 
AnswerRe: To correct code Pin
PIEBALDconsult13-Nov-14 6:04
mvePIEBALDconsult13-Nov-14 6:04 
QuestionJava problem Pin
jdzgray12-Nov-14 3:55
jdzgray12-Nov-14 3:55 
AnswerRe: Java problem Pin
Richard MacCutchan12-Nov-14 4:23
mveRichard MacCutchan12-Nov-14 4:23 
GeneralRe: Java problem Pin
jdzgray14-Nov-14 1:36
jdzgray14-Nov-14 1:36 
GeneralRe: Java problem Pin
Richard MacCutchan14-Nov-14 1:44
mveRichard MacCutchan14-Nov-14 1:44 
GeneralRe: Java problem Pin
jdzgray14-Nov-14 2:10
jdzgray14-Nov-14 2:10 
GeneralRe: Java problem Pin
Richard MacCutchan14-Nov-14 2:46
mveRichard MacCutchan14-Nov-14 2:46 
QuestionIris Recognition: Java Implementation Pin
Jesujoba30-Oct-14 8:02
Jesujoba30-Oct-14 8:02 
AnswerRe: Iris Recognition: Java Implementation Pin
Richard MacCutchan30-Oct-14 23:07
mveRichard MacCutchan30-Oct-14 23:07 
GeneralRe: Iris Recognition: Java Implementation Pin
Jesujoba4-Nov-14 6:55
Jesujoba4-Nov-14 6:55 
QuestionJava problem Pin
jaiman12328-Oct-14 8:12
jaiman12328-Oct-14 8:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.