|
by: Intaek LIM |
last post by:
generally, we use srand(time(0)) to generate random numbers.
i know why we use time(0), but i can not explain how it operates.
first, see example source below.
---------------------------------------------
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv)
|
by: Mike P |
last post by:
I have a method that I am using to generate random numbers using
Random.Next. However, every time I call the method I get the same
random number. Is there a C# equivalent of Randomize is VB6?
Thanks,
Mike
|
by: Glenn Wilson |
last post by:
I have a quick Question and I Hope some one can help or at least explain.
What is happening is that I am trying to use random numbers in an application, as per the sample test code below. When I run this code the random numbers that are displayed are all the same for abot 25 cycles and then randomize as normal.
Can some one tell me why this...
|
by: dav3 |
last post by:
I have almost completed a monster assignment on sorting algorithms (quick, insertion and selection) using c++ but I am lost on one part of the assignment. I have to generate a random list of numbers in reverse order as follows "list = 25.88 - sqrt(i)" and perform all my sorting functions no this list. I have successfully run my program on numerous...
|
by: Velhari |
last post by:
Hi,
I am a beginner. Please tell me, For generating Random Numbers, Initially why we are going for seed method.
And another question is that, I want to print unique random number how to print by using rand() method to print unique random number.
And finally i want to know, If a program generate random numbers and the same program will...
|
|
by: kiranchahar |
last post by:
Hey all,
How do I generate random numbers with Uniform distribution Uniform(a,b)
using C-programming? I want to generate uniform random numbers which
have mean following Uniform(p,q) and also variance as Uniform(s,t)? any
suggestion would be really appreciated.
Thanks,
Kay
|
by: enrique21 |
last post by:
Im trying to generate random numbers using the statement:
Random r = new Random(2);
for (int i=1;i<=18;i++)
but im having errors in my results here is my entire code so far:
import java.util.*;
public class Random4
{
|
by: 9966 |
last post by:
Greetings,
This is my second post till now. Thanks for all the advice given to me for the first post.
Now I'm having problem with generating random numbers. I know if we want to generate a random number, we can use:
int tempNUM = rand();
But, once I execute the program, the generated number is always similar, and I found this from the...
|
by: diggity |
last post by:
okay, so i started on code for Sudoku on ready to program java ... very close to java. I was able to create a 2d array and display and change the variables. What i want to do now is to generate random numbers in the array. Numbers in between 1 and 9. and then i need to check for rows, columns and the boxes... i am new to arrays and i really need...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
|