Created
December 4, 2018 08:19
-
-
Save whopiyush/ef75e4d5d2625996b9ab50d26a7ee73e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main(){ | |
| int a[5],max=0,min; | |
| for(int i=0;i<5;i++){ | |
| cin >> a[i]; | |
| } | |
| min = a[0]; | |
| for(int j=0;j<5;j++){ | |
| if(a[j] > max){ | |
| max = a[j]; | |
| } | |
| } | |
| for(int t=0;t<5;t++){ | |
| if(a[t] < min){ | |
| min = a[t]; | |
| } | |
| } | |
| cout << "Max: " << max << " Min: " << min; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment