Skip to content

Commit

Permalink
Merge pull request #1804 from Dliz05/main
Browse files Browse the repository at this point in the history
Update Armstrong.java
  • Loading branch information
tarunsinghofficial authored Oct 20, 2021
2 parents 8630c49 + f3d2bd3 commit c06cbe0
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Java_Programs_for_beginners/Armstrong.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
// using java.util.Random;
import java.util.Random;

public class generateRandom{
public class random1 {

public static void main(String args[])
{
// create instance of Random class
Random rand = new Random();

// Generate random integers in range 0 to 999
public static void main(String[] args) {
Random rand = new Random();
int ch = rand.nextInt(10);
System.out.println(ch);
int rand_int1 = rand.nextInt(1000);
int rand_int2 = rand.nextInt(1000);

Expand All @@ -24,5 +22,8 @@ public static void main(String args[])
// Print random doubles
System.out.println("Random Doubles: "+rand_dub1);
System.out.println("Random Doubles: "+rand_dub2);
}
}

}

}

0 comments on commit c06cbe0

Please sign in to comment.