//2002.09.01.this is my first programme about if...
#include <iostream.h>
main()
{
cout<<"================================="<<endl;
cout<<"please input 2 nums, any 2 nums: "<<endl;
long int x,y;
cout<<"please input the x:"<<endl;
cin>>x;
cout<<"please input the y:"<<endl;
cin>>y;
long int lower,upper;
if (x<=y)
{
lower=x;
upper=y;
}
else
{
upper=x;
lower=y;
};
long int sum=0;
for (int i=lower;i<=upper;++i)
cout<<"i= "<<i<<",";
sum=sum+i;
cout<<endl;
cout<<"the x is: "<<x<<endl;
cout<<"the y is: "<<y<<endl;
cout<<"the lower is: "<<lower<<endl;
cout<<"the upper is: "<<upper<<endl;
cout<<"the sum is: "<<sum<<endl;
cout<<"the i is: "<<i<<endl;
cout<<"do you want to exit?"<<endl;
char BB;
cin>>BB;
return 0;
}