Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int arrLength;
- int temp;
- int fmax = -2100000000, smax = -2100000000;
- cin >> arrLength;
- for (int i = 0; i < arrLength; i++) {
- cin >> temp;
- if (temp > fmax)
- {
- smax = fmax;
- fmax = temp;
- }
- }
- cout << smax << "\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement