From dbea6f736a265b97071de0512ebf5300f916f94d Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 8 Nov 2023 20:21:42 +0000 Subject: [PATCH] whoole stack of whitespace corrections --- maxloc/maxloc.c | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/maxloc/maxloc.c b/maxloc/maxloc.c index 6becf3ef..d87f9bcd 100644 --- a/maxloc/maxloc.c +++ b/maxloc/maxloc.c @@ -1,35 +1,34 @@ #include -int m2(int *a, int n) -{ - int m, nm; - int i; +int m2(int *a, int n) +{ + int m, nm; + int i; - m = 0; - nm = -1; - i=0; - while (i m) { - m = a[i]; - nm = i; - } - i++; - } - return nm; + m = 0; + nm = -1; + i=0; + while (i m) { + m = a[i]; + nm = i; + } + i++; + } + return nm; } /*Testbench*/ -int main() +int main() { - int arr[]= {5,2,8,1,3,7,9,4}; - int size = sizeof(arr) / sizeof(arr[0]); - int result = m2(arr, size); + int arr[]= {5,2,8,1,3,7,9,4}; + int size = sizeof(arr) / sizeof(arr[0]); + int result = m2(arr, size); - printf("Index of the maximum value in an array is: %d\n", result); - return 0; + printf("Index of the maximum value in an array is: %d\n", result); + return 0; } -- 2.30.2