Help with code for floating point numbers

I am stuck on this question
Produce a program which requests the inputs of ten floating point numbers between zero and one hundred and stores these numbers in an array. The program should then print the array, calculate the minimum and maximum numbers entered and their average.
My code is :
#include <stdio.h>

int main()
{
int i;
int size;
int *myArray;

printf("How many numbers \n");
scanf_s("%d",&size);

myArray=new int[size];

for(i=0;i<size;i++)
{
printf("insert number\n");
scanf_s("%d\n",myArray[i]);

}
for (i=0;i<size;i++)
{
printf("%d\n",myArray[i]);
}
delete (myArray);
}
When I get to printf("insert number") I enter a number but the system does not respond
Anyone got any ideas what I am doing wrong
Thanks
Use &myArray[i]. It needs the address of that array cell, not its value. You did it correctly with &size a few lines above.
Thanks for that
I have done what you suggested but when I type a number after the question insert number it does not recognise the first number I type but recognises the second number I insert but still fails to work.
Have you got any ideas
I am new at this sorry for being a bit slow on the uptake
thanks
I don't have the details of scanf_s atop my head but you scan "%s\n" in one and just "%s" in the other call so the line feed might make trouble.
My next problem is I have to find the largest, smallest and the average of the 10 numbers I type in
this is the code I used

int largest;
int numbers[10];


largest=numbers[0];
while(i<10)
{
if(numbers[i]>largest)
{
largest=numbers[i];
}
i++;
}
printf("\n The largest number is : %d\n",largest);
Anyone got any ideas
Thanks
Topic archived. No new replies allowed.