Im not thinking at all anymore. I am so fed up with this calss I just want to drop itand take knitting or something... No one taught us to use rand() but they are telling us to use it with no reference to it other than rand(). I need a random number between 1 and 50 put into each place in the array. then it has tp print out each number from the array in 4 X 8 format (the array is [4][8])
Code:
#include <stdio.h>
int num[4][8];
int suba, subb;
int ctr, ctr2, x;
void eoj();
void read();
void main()
{
read();
}
void read()
{
for(suba = 0; suba < 4; suba++)
{
for(subb = 0; subb < 8; subb++)
{
x = rand()%51;
if(x < 50 || x > 1)
{
num[suba][subb] = x;
continue;
}
printf("%4d", num[suba][subb]);
}
printf("\n");
}
}
void eoj()
{
name();
printf("EXECUTION COMPLETED... Press ENTER to contiune.\n");
getchar();
}