Code that needs to be modified:
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main()
{
int i,N,x;
unsigned int seed;
double R;
printf(“nEnter number of iterations and seed”);
printf(“n”);
scanf(“%i %u”, &N,&seed);
srand(seed);
for(i=0;i<N;i=i+1)
{
R=(double)rand()/RAND_MAX;
if (R<0.5)
x=x+1;
else
x=x-1;
}
printf(“Final location is “);
printf(“%d”,x);
printf(“n”);
}
Question: Write a code that generates N=10000 pairs of randomnumbers. Call the first member of each pair x and the second membery, and plot the pair x,y as points in the x-y plane. What do youexpect to happen?
Historical Note: A defect in an early IBM random numbergenerator was discovered by considering random numbers as points(x1,x2,…) in an m-dimensional space.
******* please help!!! and only help if you know how to do it toyour best capability. please show
PayPal Gateway not configured
PayPal Gateway not configured