import javax.swing.JOptionPane;
public class NewClass{
public static void main(String args []){
int x,y ;
x = 5;
y = Integer.parseInt(JOptionPane.showInputDialog("please Enter y"));
if ( y > x ){
System.out.println ( y + " this number is greater " );
}
else if ( y> x ) {
System.out.println ( y + " this number is smaller " );
}
else {
System.out.println ( " Good Job " );}
}
}}
that what all i've done so far as the program will only ask once and my program will be :P as i wanted it
but i wanted to put the while into it
i'm still thinking of your post it is really helpful but need more hints like as u're saying i can use a condition tools like if ? if yes i didn't know that
and about that part "- create a loop that keeps looping as long as the user input is not equal to the random number " i'm trying to figure how can i do this :x i'm not having so much info about using the loops i'm trying to buy making some research and and lot of things but i said i might get some help here
i'm just asking for a little guides that can help me through this and thanks for your effort :)