#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>

double range_rand(double from, double to)
{
    return (double)rand() / RAND_MAX * (to - from) + from;
}

void help(const char* name) {
    printf(
        "Generates given number of records.\n"
        "Usage:\n"
        "\t%s <min> <max> <count>\n"
        ,
        name
    );
}

int main(int argc, const char* argv[])
{
    if (argc < 4) {
        help(argv[0]);
        return -1;
    }

    double from = atof(argv[1]);
    double to   = atof(argv[2]);
    int count   = atoi(argv[3]);
    
    srand(time(0));
    while (count--) {
        printf("%lf %lf\n", range_rand(from, to), range_rand(from, to));
    }

    return EXIT_SUCCESS;
}