Skip to content

Instantly share code, notes, and snippets.

@RedyAu
Created April 12, 2022 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RedyAu/3a74f1901d52579efae4eb2322759b68 to your computer and use it in GitHub Desktop.
Save RedyAu/3a74f1901d52579efae4eb2322759b68 to your computer and use it in GitHub Desktop.
Energetika vezeték-keresztmetszet kerekítés gyakorláshoz számgenerátor
import "dart:math";
List<double> sor = [0,1.5,2.5,4,6,10,16,25,35,50,70,95,120,150,185,240,300,400,500];
void main() {
var r = Random();
for (int i = 0; i < 400; i++) {
int place = r.nextInt(sor.length - 1) + 1;
int max = (sor[place] * 10).floor();
int min = (sor[place - 1] * 10).floor();
print((r.nextInt(max - min) + min) / 10);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment