i need to find the max position of my program. how can i do that?
Code:
int main() { int j[10],max=0,k; for(k=0;k<=9;k++) { printf("Enter the number:"); scanf("%d", &j[k]); } for(k=0;k<=9;k++) { printf("x[%d]=%d\n", k, j[k]); if(max<j[k]) { max=j[k]; } } printf("The maximum number is %d\n",max); }
Comment