Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int bigindex(double array[], int size);
- int main(void){
- double array1[]={-23.23,129,90.02,123.123,900.2321};
- printf("The index of the biggest number is %d.\n", bigindex(array1, 5));
- return 0;
- }
- int bigindex(double array[], int size){
- int i, index;
- double biggest=-1000;
- for(i=0; i<size; i++){
- if(array[i]>biggest){
- biggest=array[i];
- index=i;
- }
- }
- return index;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement