21天学通c++之7.3---while 循环
#include <iostream>
using namespace std;
int main()
{
unsigned short small;
unsigned long large;
const unsigned short MAXSMALL=65535;
cout<<"enter a small number ";
cin>>small;
cout<<"enter a large number ";
cin>>large;
cout<<"small: "<<small<<"...";
while(small<large&&small<MAXSMALL)
{
if(small%5000==0)
{cout<<".";};
small++;
large-=2;
}
cout<<"\nsmall: "<<small<<"\nlarge: "<<large<<endl;
return 0;
}