im new with this forum and Java programming .
im gonna code a lottery simulator in JAVA . as you can see in below i got some problem in coding that cause my program wont compile .
would you take a look at it and help me to develop this application ...
by the way ive checked other created topic regarding to this Lottery game , however non of them were using my way , using array.
"
i want the user enter 3 digits so program will compare the entered digits with random numbers from 1 to 10 , if one of the entered numbers match with random digits , display user wins 10$ , if 2 number match , user wins 100$, if all of them match , user wins 100000$ ! "
import java.util.Scanner; import java.util.Random; public class Lottery { public static void main (String args[]){ int lucky=new int[3]; int bingo=0; Random r1=new Random(); Random r2=new Random(); Random r3=new Random(); int num1=r1.nextInt(10); int num2=r2.nextInt(10); int num3=r3.nextInt(10); } public static void pick(int[]lucky){ for (int i=0;i<lucky.length;i++){ System.out.print("enter 3 number ! "); if (lucky[0]==num1 || lucky[0]==num2 || lucky[0]==num3) { bingo=bingo+10;} else if { (lucky[1]==num1 || lucky[1]==num2 || lucky[1]==num3)} else if (bingo==10){bingo=bingo+90;} else if (lucky[2]==num1 || lucky[2]==num2 || lucky[2]==num3) (else if bingo==100){bingo=bingo+900} else if (lucky[]==num1||lucky[]==num2||lucky[]==num3)if (bingo=1000) { bingo==bingo+9000} else {bingo==0;} } }