Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by F64081177 ( 6 years ago )
//輸入繩子長度n,每天對半剪,求幾天後繩子長度將小於等於1
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <cstdlib>
using namespace std;
int main(void)
{
float n;
int i=1;
cin >> n;
while(n>1)
{
n=n/2;
cout << i << endl;
i++;
}
system ("pause");
return 0;
}
Revise this Paste