Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hansen033/806ee427946e249951c80637135199c8 to your computer and use it in GitHub Desktop.
Save hansen033/806ee427946e249951c80637135199c8 to your computer and use it in GitHub Desktop.
2017.11.09 上課好像是測驗
#include <iostream>
using namespace std;
int main(){
int limit;
cout << "please input the LIMIT:";
cin >> limit;
for (int times = 3; times < limit; times += times){
cout << times << " ";
}
int limit2, times2;
cout << "\nplease input the LIMIT:";
cin >> limit2;
times2 = 3;
while (times2 < limit2){
cout << times2 << " ";
times2 += times2;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment