- Joined
- Oct 18, 2022

- Messages
- 1

- Reaction score
- 0

#include <stdio.h>

#include <cmath>

int n, i, arr[100], sum;

int main()

{

scanf("%d", &n);

sum = 0;

for (i = 0; i < n; i++)

scanf("%d", &arr

*);*

for (i = 0; i < n; i++)

sum = sum + arr

for (i = 0; i < n; i++)

sum = sum + arr

*;*

int arrmax = -100;

for (i = 0; i < n; i++)

if (arrint arrmax = -100;

for (i = 0; i < n; i++)

if (arr

*> arrmax) arrmax = arr**;*

for (i = 0; i < n; i++)

arr[1] = arrmax;

printf("%d", arrfor (i = 0; i < n; i++)

arr[1] = arrmax;

printf("%d", arr

*);*

return 0;

}

P. S: I wrote a[1] = arrmax, but it doesn't make any sensereturn 0;

}

P. S: I wrote a[1] = arrmax, but it doesn't make any sense