Created
February 12, 2020 23:39
-
-
Save bkyrlach/5aa379d42cdd6f8daee657955e89b9b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.kyrlach.hello; | |
| import java.util.Random; | |
| import java.util.Scanner; | |
| public class Program { | |
| public static void main(String[] args) { | |
| Random r = new Random(); | |
| Scanner s = new Scanner(System.in); | |
| Integer x = s.nextInt(); | |
| if(x < 99) { | |
| for(int i = 0; i < x; i++) { | |
| Integer rng = r.nextInt(10) + 1; | |
| System.out.print(rng.toString()); | |
| System.out.print(" : "); | |
| } | |
| } else { | |
| System.out.println("Get lost."); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment