Last active
August 30, 2020 08:58
-
-
Save zontyp/97de72df8151f9ac02194e6d4a128de6 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
import 'dart:io'; | |
import 'dart:math'; | |
main () | |
{ | |
Random r = Random (); | |
var computer = r.nextInt (11); | |
var player = int.parse (stdin.readLineSync()); | |
if (computer > player) | |
{ | |
print ("my number is higher"); | |
} | |
if (computer < player) | |
{ | |
print ("my number is lower"); | |
} | |
if (computer == player) | |
{ | |
print ("you got it!"); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment