1)
//#include "stdafx.h"//If the vc++6.0, with this line.
#include
using namespace std;
int main(int argc,char *argv[]){
int i;
for(i=30;i>=0;cout << i << ' ',i-=3);
cout << endl;
return 0;
}
2)
//#include "stdafx.h"//If the vc++6.0, with this line.
#include
using namespace std;
int main(int argc,char *argv[]){
int max,min;
while(1){
cout << "Enter a minimum value between 1 and 100:";
cin >> min;
cout << "Enter a maximum value between 1 and 100:";
cin >> max;
if(min<1 || min>100 || max<1 || max>100)
cout << "Values must be sithin specified range.\n";
else if(max<=min)
cout << "Maximum value must be greater than minmum value.\n";
else
break;
}
while(min<=max)
cout << min++ << ' ';
cout << endl;
return 0;
}
这个我可以帮你写的,还有没有其它什么要求!
这个要收费的