Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- while (1)
- {
- int cases, i, count = 0;
- float arr[100], lowest, j, time;
- scanf("%d", &cases);
- for (i = 0; i < cases; i++)
- {
- scanf("%f", &arr[i]);
- }
- lowest = arr[0];
- for (i = 1; i < cases; i++)
- {
- if (lowest > arr[i])
- {
- lowest = arr[i];
- }
- }
- printf("%.2f\n", lowest);
- }
- return 0;
- }
- /*int arr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
- int i, smallest;
- smallest = arr[0];
- for (i = 1; i < 10; i++)
- {
- if (smallest > arr[i])
- smallest = arr[i];
- }
- printf("Smallest element of arr is %d", smallest);*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement