# Thread: developing an easy CAI programm in C

1. > I can't quite understand that, could u pls explain more?!
x = rand();
means in terms of a function (ie rand) returning a result (of type int)

2. Originally Posted by Salem
> I can't quite understand that, could u pls explain more?!
x = rand();
means in terms of a function (ie rand) returning a result (of type int)

ok I guess this is what you mean:
Code:
```int func(int x,int y)
{
int c;
printf("How much is the product of %d and %d? \n",x,y);
scanf("%d",&c);
return c;```
yea this should work...tnx

and my int main body is going to be like this:
Code:
```int main()
{
int a,b,h,d;
srand(time(NULL));
a= rand() % 10;
b= (rand() % 10);
printf("Hello, this is computer assited instruction for multiplication...\n");
h=func(a,b);
d=a*b;
if(h==d)
correct();
else
wrong();
return 0;
}```

3. now could someone give me a hint about how my program remembers the times of occurrence of a certain number?!
like 3,4,5,5,6,7,7,7
a program that tell me 5 is been occurred 2 times,and 7,three times

4. If you're only using ten integers (0 - 9), you can create an array with ten elements (0 - 9).

When a random number is chosen, increment that element of the array by one.