OK. the equation I proposed was a put-together of two seperate functions. What I have to do is integrate the left side and the right side seperately... then make them equal to each other.
...
Type: Posts; User: adinclik
OK. the equation I proposed was a put-together of two seperate functions. What I have to do is integrate the left side and the right side seperately... then make them equal to each other.
...
I need to write a program in C to integrate the following simple equation:
dy/y= x dx
and I have no clue whatsoever on how to integrate it... :confused:
Could somebody please show me the...
Uh i see,
*but what should i do to confine the generated numbers to a range of say [0, 0] to [(Pi/2), 1]?
*Also, what should i change to produce 1000 random numbers instead of 10?
#include <stdlib.h>
int min(void){
int i;
i= rand();
printf("%d", i);
double d = i / RAND_MAX * PI;
I've just written a simple program which returns 1 random number...
BUT WHY DOES IT ALWAYS RETURN AROUND 27000!!!???
is there a trick to fix this?
also, can you show me how to limit the...
thanks to Michael Ashley...
// An example showing how to generate random floating
// point numbers between 0 and 1.
// Michael Ashley / UNSW / 02-Apr-2003
#include <sys/time.h>...
Can u please give me a simple example because i dunno how to use rand() or double...
OK
i found a random number generator program and it goes like this
#include <stdio.h>
#include <assert.h>
#define MAXBIT 30
i'm noob in c prog.
so all i can do is find sin(x) for different values of x. you know, the basic printf and scanf thingy..
i can probably integrate sin(x), but i cant possibly find the...
Hi I'm Ali,
My problem is as follows:
*i need to write a program to calculate the INTEGRAL of sin(x), from x=0 to x=pi/2.
*Also, i need to produce 1000 random numbers within 0 and pi/2.
...