User:Login1994

userpage of login1994.

About login1994
Username "login1994", has been a frequent used name that people use online. Not only does it hide personal information about the particular user, it is also easy to remember. And with this username, i have used it in many different sites. At times, it does not allow you to register becuase the name is preowned by other user. In this case, '1994' has been reduced to '1993', or vice versa, untill the name executes successfully.

Purpose of this article
This article has been created to accomplish the first exercise of BCA 11 (Business Web Communication 11) in Point Grey Secondary School. For more information about the exercise, or the course, link:Wiki assignment page.

Previously made program
A previous assignment done with wikispaces: CPlusPlusCrap It is a wiki about c++ programming. It is where we upload and discuss code that we wrote in IT12. Indeed a very useful site for C++ learning, and for people who just started learning to program.

Random Seed
srand function, is used to seed the value of random function. This is important to prevent same random number to be produced everytime the program is executed.

prototype: void srand(unsignec seed);

in order to generate a random value, the function itself requires a seed. For example srand(1), uses the value 1 to initialize its seed. the most common seed is time. To obtain the system time value, time function is required, and its return value will range from 00:00:00 GNT January 1 1970 to the current time, and then the format time_t will be converted by (unsigned), and its value will then return to the seed itself: srand((unsigned)time(&t))

another way of generating a random number: srand((unsigned) time(&t)), where a null value has been sent to the time function. It does not require the declaration of the time class: time_t t;.

int main(void){ int number[MAX] = {0}; int i; unsigned int seed; scanf("%d",&seed) //manually enter seed value srand(seed); number[i] = rand % 100; printf("%d ", number[i]); return 0; }
 * 1) include 
 * 2) include 
 * 3) include 
 * 4) define MAX 10