C++中的log10函数
来源:互联网 发布:pdf编辑软件绿色版 编辑:程序博客网 时间:2024/04/30 12:41
上机内容:求两个数相加后的位数
上机目的:
我的程序:
/** 程序的版权和版本声明部分:* Copyright (c) 2016, 信息学院* All rights reserved.* 文件名称:求两个数想加的位数* 作 者:邓华伟* 完成日期:2017年3月4日* 版 本 号:v1.0* 对任务及求解方法的描述部分:* 输入描述:无* 问题描述:无* 程序输出:数的位数* 问题分析:运用log10函数* 算法设计:略*/#include<iostream>#include<cmath>using namespace std;int main(){ int a,b; while(cin>>a>>b) { a=log10(a+b)+1; cout<<a<<endl; } return 0;}
运行结果:
100 900
4
心得体会:
寻找简单的方法来解决问题!
1 0
- C++中的log10函数
- 日常小记:C++中的log10函数
- log10 ()函数
- log10 () 函数
- log10 函数
- hdu 1018 log10函数
- python log10() 函数
- Matlab基本函数-log10函数
- log10
- log10
- log10 ( ) 【C语言库函数源代码】
- C语言中log,ln,log10
- matlab2c使用c++实现matlab函数系列教程-log10函数
- UVA 11029 Leading and Trailing (log10()函数+快速幂)
- nyoj 461Fibonacci数列(四)(log10()函数)
- Leading and Trailing 快速幂和cmath函数(modf函数,log10函数,pow函数)
- c中的函数指针
- C ++ 中的函数
- 关于UTF-8
- Day4 循环和关系表达式
- redis和memcache的区别
- C++之STL--queue模板类
- 《Objective-C编程全解》 读书笔记 第二章
- C++中的log10函数
- HDU-4738 Caocao's Bridges,注意重边不是桥!
- Android日历控件
- [LeetCode]409. Longest Palindrome
- 写给过去慵懒的自己
- 开源协议在再发布过程中的授权总结
- Vue服务端渲染业务入门实践
- 【AngularJS】表头排序
- JAVA中 怎么判断输入的字符串是不是一个数字