Alright, newb question, bare if you can =P, I do have an example of my work, dont worry im not asking you to do my homework. Alright, I need the user to input 10 intergers, store them in a float array and output the max, hes my work so far.
Code:
#include<stdio.h>
#define size 10
main()
{
int i, A[size];
float max;
printf("Enter 10 intergeers: ");
for (i=0; i<size; i++)
scanf("%f", &A[i]);
for (i=0; i<size; i++){
if (A[i] > max)
max == A[i];
}
printf("The max is %.0f \n", max);
system("PAUSE");
return 0;
}
obviously it just spits out some nonsense. Not sure what im doing wrong. Thanks for any help.