Created with <3 with dartpad.dev.
Created
October 16, 2023 03:57
-
-
Save matifdeveloper/6469d903911be4b46f72e515a97d9335 to your computer and use it in GitHub Desktop.
Random Number
This file contains 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
import 'dart:math'; | |
void main() { | |
// Create a random number generator | |
Random random = Random(); | |
// Generate a random integer between 1 and 1000 | |
int randomValue = random.nextInt(1000) + 1; | |
print('Random value between 1 and 1000: $randomValue'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment