1#include <stdio.h>
2int main() {
3 int i, n;
4 float arr[100];
5 printf("Enter the number of elements (1 to 100): ");
6 scanf("%d", &n);
7
8 for (i = 0; i < n; ++i) {
9 printf("Enter number%d: ", i + 1);
10 scanf("%f", &arr[i]);
11 }
12
13 // storing the largest number to arr[0]
14 for (i = 1; i < n; ++i) {
15 if (arr[0] < arr[i])
16 arr[0] = arr[i];
17 }
18
19 printf("Largest element = %.2f", arr[0]);
20
21 return 0;
22}
23