I'm taking my first ever programming class and most of it is self taught. So please bear with me.
After the users input numbers, such as 10, 20, 100, 3, 4 there should be an output to read "the index of the largest elmeent in list1 array is _ The largest element in list1 array is 100" "
Here is my code so far. I know how to get the output of the largest array but not the first line or how to name my array. Thanks so much in advance.
#include<stdio.h>
int main()
{
int i;
float arr[5];
printf("Please enter five numbers:\n ");
for (i = 0; i < 5; ++i)
{
scanf_s("%f", &arr[i]);
}
for (i = 1; i < 5; ++i)
{
if (arr[0] < arr[i])
arr[0] = arr[i];
}
printf("Largest element = %.2f", arr[0]);
return 0;
}

int main(void)orint main(int argc, char **argv), notint main().