Skip to content

Instantly share code, notes, and snippets.

@krasnobaev
Created August 20, 2021 23:49
Show Gist options
  • Save krasnobaev/ad3e9d8846ab02044f24aa04db3399e7 to your computer and use it in GitHub Desktop.
Save krasnobaev/ad3e9d8846ab02044f24aa04db3399e7 to your computer and use it in GitHub Desktop.
// Hello world! Cplayground is an online sandbox that makes it easy to try out
// code.
#include <iostream>
#include <stdlib.h>
#include <math.h>
#include <time.h>
using namespace std;
int main() {
srand (time(NULL));
for (int i=0; i<20; i++) {
cout << ( float(rand()) / float(RAND_MAX) ) << "\n";
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment