Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- double vec(double minElement, int num, int cnt) {
- if (num >= cnt-1)
- return minElement;
- double newElement;
- cin >> newElement;
- minElement = min(newElement, minElement);
- return vec(minElement, ++num, cnt);
- }
- int main() {
- int n;
- cin >> n;
- double t;
- cin >> t;
- cout << vec(t, 0, n) << '\n';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement