Created
November 9, 2017 11:55
-
-
Save hansen033/806ee427946e249951c80637135199c8 to your computer and use it in GitHub Desktop.
2017.11.09 上課好像是測驗
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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