Hi
I am new to java and I am trying a program to random numbers. What i am trying is to create 50 random numbers which are assigned to different vales. I have tried this by using a do while loop for this. Please check the following code.
When I compile it I get any error. Any advice on this or help.Code:int gennum = 0; int curval = 2; do { int rannum = (int)Math.round((Math.random() * 365) + 1); } while (gennum < 49) { int rannum.currentValue = (int)Math.round((Math.random() * 365) + 1); currentValue++; generagteNum++; }
Bookmarks