Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- using namespace std;
- int main(){
- ifstream f1("atestat.in");
- int x,y,aux,a,x1=0,y1=0;
- f1>>x>>y;
- if(x > y ){
- aux=x;
- x=y;
- y=aux;
- }
- while(f1>>a){
- if(x1 == 0){
- if(x < a){
- cout<<x<<" ";
- x1=1;
- }
- }
- if(y1 == 0){
- if(y < a){
- cout<<y<<" ";
- y1=1;
- }
- }
- cout<<a<<" ";
- }
- cout<<y;
- f1.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement