Response to the edit: The "previously implemented alogrithm" does not exist haha... My professor told us he copied and pasted problems from different professors... Didn't realize he left that line still in there.
Thank you so far.
Went to a tutor a bit later that night.
My code so far. Debating about nested loop or this approach.
Code:
#include <stdio.h>
int main(){
int i,n,j, largest, temp, List[100], SlotofLarge, slot, swap, list;
int getMax (int *list, int n);
float arr[100];
printf("Enter total number of elements(1 to 100): ");
scanf("%d",&n);
printf("\n");
for(i=1; i = temp; ++i)
{
printf("Please enter Number %d: ",i+1);
scanf("%f",&arr[i]);
}
for(i=1;i<n;++i) /* Loop to store largest number to arr[0] */
{
if(largest<arr[i])
largest=arr[i];
}
temp = n;
for(i=0; i<n;){
SlotofLarge = getMax(int list, temp);
swap = List[temp-1];
List[temp-1] = List[slot];
List[slot] = swap;
temp--;
}
return 0;
}