Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <algorithm>
- #include <cmath>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- double minim = 100000000000000000;
- double* a = new double[n];
- for (int i = 0; i < n; i++) {
- cin >> a[i];
- if ((a[i] >= 0) && (a[i] < minim)) {
- minim = a[i];
- }
- }
- cout << minim;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement