私信TA
用户名:W2454716805u
访问量:3500
签 名:
自我简介:
作者: Donbdha 发表时间:2018-05-13 17:44:11 浏览:719 | 评论:0
解题思路:直接用while就行,也可以使用递归,不需要考虑小数部分。注意事项:参考代码:
#include <stdio.h> int main() { int N; while(scanf("%d",&N) != EOF) { int num = 0; while(N >= 1) { N /= 2; num++; } printf("%d\n",num); } return 0; }
0.0分
3 人评分
看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:
编程语言转换
万能编程问答
代码解释器