返回列表 發帖
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4. int main(void){
  5.    
  6.     int rope = 3500;
  7.     int day = 0;
  8.    
  9.     while(rope > 3){
  10.     rope = (rope / 2);
  11.     day = day + 1;
  12.     }
  13.    
  14.     cout << day << endl;
  15.    
  16.     system("pause");
  17.     return 0;
  18. }
複製代碼

TOP

返回列表