What do you want to save?
Add Code snippet
New code examples
-
C 2021-09-11 00:11:03
random en c
#import <stdlib.h> #import <time.h> int r; srand(time(NULL)); r = rand(); /* This will give you a pseudo random integer between 0 and RAND_MAX. srand(time(NULL)) is used to give it a random starting seed, based on the current time. rand() ... Add solution -
PHP 2021-09-09 22:56:03
create unique filename php
$filename = uniqid(rand(), true) . '.pdf'; Add solution -
PHP 2021-09-08 09:39:01
create a random question generator php
<?php //Connect with mysql $db = new mysqli("host","user","pass","db"); //Perform the query to choose random questions $query = $db->query("SELECT * FROM `table` ORDER BY RAND() LIMIT 2... Add solution -
C++ 2021-09-07 05:05:02
write a program that simulates the rolling of two dice in c++
#include<iostream> #include<cstdlib> #include<ctime> #include<iomanip> #include<vector> #include<cmath> #include<algorithm> int main( ) { std::cout << "enter seeding number: " ; int nu... Add solution -
C++ 2021-09-06 18:52:02
make random nuber between two number in c++
#include <stdio.h> /* NULL */ #include <stdlib.h> /* srand, rand */ #include <time.h> /* time */ int Main() { int randomNumber; /* initialize random seed: */ srand (time(NULL)); /* generate random number between... Add solution