Storing the numbers in an array
I seen to have over come the problem of generationg time dependant random numbers abd I also midified the code to give me an output in my desired range but I can'nt seem to store it in an array I would find it very helpful if someone cam point me to the right direction and tell me where I went wrong.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define x 10
int main()
{
float i,a;
float s[x];
srand( time( 0 ) );
for (i = 0; i <=10; i++)
{
a=rand()%26;
a=a/11;
s[i]=a;
scanf("%1.1f",&s[i]);
printf("%1.1f\n",s[i]);
}
return 0;
}