.每瓶汽水1元,两个空瓶可以置换一瓶汽水,现在有20元,最多能喝多少瓶汽水
2015-11-02 12:43
387 查看
#include<stdio.h> int main() { int n = 20; int count = 20; int m; m = n / 1; while (m) { m = m / 2; if (m == 5) { count += m; m = m / 2; count += m; if (m == 2) { m = m / 2; count+=m; m = (m + 1) / 2; m = m + 1; count += m; break; } } count+=m; } printf("%d\n",count); system("pause"); return 0; }
相关文章推荐
- Windows7下获得System权限问题解决方法
- 安装软件 Nullsoft Install System 2.27汉化版 下载
- Could not load type System.ServiceModel.Activation.HttpModule解决办法
- PHP 命令行工具 shell_exec, exec, passthru, system详细使用介绍
- PHP中return 和 exit 、break和contiue 区别与用法
- ASP中获得Select Count语句返回值的方法
- 浅析return false的正确使用
- oracle忘记sys/system/scott用户密码的解决方法
- js怎么终止程序return不行换jfslk
- mysql_num_rows VS COUNT 效率问题分析
- Oracle中sys和system的区别小结
- System Repair Engineer (SREng) 功能介绍与下载
- Office 2007 System 常见问题集第1/3页
- php中使用exec,system等函数调用系统命令的方法(不建议使用,可导致安全问题)
- PHP源代码数组统计count分析
- Mysql中的count()与sum()区别详细介绍
- 解析php中die(),exit(),return的区别
- System 类 和 Runtime 类的常用用法介绍
- c语言中return与exit的区别浅析
- Ruby中的return、break、next详解