1. An array declared as array[n] contains elements [0..n-1], not [1..n]. Your for loops are incorrect.
2. You don't check that 0<n<50.
3. You're doing the division on integral values:
1 2 3 4 5 6 7 8
int a=10;
float b=1/a;
/*
b==0 because 1/10==.1, but since a is an integer, the value is truncated to 0.
To get the correct value, you need to convert to the correct type:
*/
b=1/float(a);
//b==.1
4. main() does not have a return type. main() should always return int.