Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // 2.cpp
- // 12
- //
- // Created by Алексей on 23/10/2018.
- // Copyright © 2018 Алексей. All rights reserved.
- //
- #include <iostream>
- #include <math.h>
- #include <cmath>
- #include <stdio.h>
- using namespace std;
- int main(){
- int minim=0, maxim=0, a;
- while(true){
- cin>>a;
- if(a==0){
- break;
- }
- if(a>maxim){
- maxim=a;
- }
- if(a<minim){
- minim=a;
- }
- }
- cout<<minim+maxim;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement