请设计一个函数,不许用到字符串函数,用数学运算,将double类型数据转换,例如123.456转换成654.321

首先想到依次提取他的每一个位数,然后进行运算,移动每一位数到相应位置,结果相加就能逆序double数

下面上程序:

#include <stdio.h>
#include <stdlib.h>
#include <string.h> double ConvertDouble(double Val)
{
int leftLen=0, rightLen=0;
double leftVal, rightVal;
double convertVal = 0.0; //取左边整数和右边小数部分的值
leftVal = (double)(int)(Val);
rightVal = Val - leftVal; //获取整数部分长度,按题意等于小数部分长度
while (leftVal > 0.99)
{
leftVal /= 10;
leftLen++;
} for (int i = 1; i <= leftLen; i++)
{
leftVal = (int)Val;
int nTen = 1;
for (int j = 0; j < i; j++)
{
nTen *= 10;
} leftVal = (int)((leftVal / nTen) * 10)%10; //分别提取整数部分的每一位
convertVal += leftVal / nTen; //把整数部分倒到小数部分 rightVal = Val - (int)Val; //去掉整数部分
rightVal = (int)(rightVal*nTen) % 10; //分别提取每一位小数
convertVal += rightVal*nTen / 10; //把小数部分倒到整数部分
}
return convertVal;
} int main()
{
printf("%lf \n", ConvertDouble(1234.5678));
return 0;
}

运行结果如下图:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAANAAAABdCAYAAADUiuhyAAAgAElEQVR4Ae19CbhdVZXmuu/eoP19/ZWQgRYNSManQdtWQgagyoiUCtrVLaMkSBKIdjMFaJSyrKGt9kOtEtqWobpLgSRARgY/vhbQcgqDCYRBqzVIkpfBAgtNXgCruj8tk/du//9ae+2zz3nnvHvfg6CYs1/O2Xut9a+1115n7bP3Ofe+l8ZT//jL9i/3DUijp0ekLVYLavxoCZUROANTVtrK5wkK1KEtBbalrbQptg1okvYgcJBDRP7gwIAMtgdkYP9+1CajHdOEvZ6m+tcMdaPRIw12hxMPWEKf1is7oIxehEoZbBMb+YQogtpZZ9qmrikEKw3p6WE/Ij1mXLX9ZDqgMjMuytc0oE6hYhuFVdY/WiFOQazybGym7Gba9IV41EEN1jIM42/9NARRtbFQDLDhrT/1QTs0Pn3QH4L0YEUOi5+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wbju+w+UFqXeoI1BEYWQRazZ5m2L7hC6WYRY2e+leERhbCGn0wR6DVbGIC6datIT2YPKTrUkegjkB3EWg1Wy1//MEKhAkEui51BOoIdBeBVmvMIfohKl8ecPVptsZ0p1mj6gjUEZAWZhDCwE0cXiRgC2d0HZk6AnUEuolAqzkGWzbOHqxA9gxUb+G6CVyNqSPACOAtnE+YegLVKVFHYKQRwFs4vLbGCqRbOHwW1EO6LnUE6gh0FYEWP/vRD1I5g1jqT1QtDvW5jkAXEdAJxO/A6W/U6TcS6q8kdBG3GlJHQCOg/8mwLzo2deoJVOdGHYFuI5D/D7a61apxdQTqCGgE+FXSutQRqCMwygjoO2yfRL6VG6WtWq2OwEEXgf8PT4MdFnr1emUAAAAASUVORK5CYII=" alt="" />

如果有什么问题和疑问可以在下面留言互相探讨。

原题我已经上传到这里了http://download.csdn.net/detail/yincheng01/6461073 ,

解压密码为 c.itcast.cn

基于Visual C++2013拆解世界五百强面试题--题6-double类型逆序的更多相关文章

  1. 基于Visual C++2013拆解世界五百强面试题--题3-打印螺旋数组

    请用C语言实现 输入N,打印N*N矩阵 比如 N = 3, 打印: 1 2 3 8 9 4 7 6 5 N = 4, 打印 1   2    3   4 12  13   14  5 11  16   ...

  2. 基于Visual C++2013拆解世界五百强面试题--题2-输出和为一个给定整数的所有组合

    请用C语言实现 输出和为一个给定整数的所有组合 启动2012 /* 请用C语言实现 输出和为一个给定整数的所有组合 */ #include <stdio.h> //包含头文件stdio.h ...

  3. 基于Visual C++2013拆解世界五百强面试题--题1-定义各种类型指针

    用变量a给出下面的定义    a)一个整型数    b)一个指向整型数的指针    c)一个指向指针的指针,它指向的指针是指向一个整型数    d)一个有10个整型数的数组    e)一个有10个指针 ...

  4. 基于Visual C++2013拆解世界五百强面试题--题18-程序结果分析2-终结篇

    第二部分程序结果分析,分析流程还是写入代码注释中 分析下面程序的输出: #include <stdio.h> int main() { char *a = "hello" ...

  5. 基于Visual C++2013拆解世界五百强面试题--题17-程序结果分析1

    分析程序结果,分析过程我们就写在程序注释里面. 写出下列代码的输出内容 #include <stdio.h> int inc(int a) { return (++a); } int mu ...

  6. 基于Visual C++2013拆解世界五百强面试题--题16-进制分析

    清写出下列代码的输出内容 #include <stdio.h> int main() { int a = -1, b = -12, c = -123, d = -1234; printf( ...

  7. 基于Visual C++2013拆解世界五百强面试题--题15-递归相加

    有一分数序列: 1/2 , 1/4 , 1/6 , 1/8 ......,用递归的方法,求此数列20项之和. 可以看出规律:每一项位1/n*2 这个很容易些递归,但是要注意一点,使用浮点数相除保存: ...

  8. 基于Visual C++2013拆解世界五百强面试题--题14-循环删除

    有一个数组a[1000]存放0-1000,要求每隔二个数删除一个数,到末尾时循环到开头继续进行,求最后一个被删掉数的原始下标. 看到题目可以用循环链表保存这些数,然后循环删除,大大减少了一些复杂的边界 ...

  9. 基于Visual C++2013拆解世界五百强面试题--题13-找最大公共子字符串

    编程实现:找出两个字符串中最大公共子字符串,如"abccade"和"dgcadde"的最大子字符串为"cad". 如果不考虑效率的话直接比较 ...

  10. 基于Visual C++2013拆解世界五百强面试题--题12-进制转换

    编程实现,把十进制数(long型)分别以二进制和十六进制形式输出,不能使用printf系列库函数. 转换成二进制,直接循环移位依次取每一位,判断1或0然后将相应字符放入字符串缓冲区中. 对于十六进制, ...

随机推荐

  1. ios本地文件内容读取,.json .plist 文件读写

    ios本地文件内容读取,.json .plist 文件读写 本地文件.json .plist文件是较为常用的存储本地数据的文件,对这些文件的操作也是一种常用的基础. 本文同时提供初始化变量的比较标准的 ...

  2. ##DAY15——UICollectionView

    DAY15——UICollectionView 创建UICollectionView //创建一个布局对象,采用系统布局类UICollectionViewFlowLayout UICollection ...

  3. 像jq那样获取对象的js原生方法

    使用过jq的童鞋非常喜欢jq获取对象的方法,只要$()就可以获取,在此我封装一个js获取对象的方法 [注意]只对chrome,Firefox,opera,Safari,ie8及ie8以上版本有效 fu ...

  4. BZOJ 4321: queue2( dp )

    dp(i, j, 1)表示前i个, 有j对是不合法的, i和i-1是在一起的. dp(i, j, 0)表示前i个, 有j对是不合法的, i和i-1不在一起的. 转移我们只需考虑是多了一对不合法的还是少 ...

  5. 收集的jquery插件

    1.精美jQuery分页插件 带滑动条分页使用HTML5实现刮刮卡效果 今天开始我们来收集一些jQuery分页插件,今天第一款jQuery分页插件适用于长翻页列表的分页应用,因为这款分页插件带有滑动条 ...

  6. wampserver 绑定域名(wampserver 本地域名测试配置)

    一.tomact 配置虚拟主机 1.打开Apache菜单下“httpd.conf”文件: 找到“# Include conf/extra/httpd-vhosts.conf” , 把这句前面的#号去掉 ...

  7. JVM内存最大能调多大分析

    上次用weblogic 把 -XmxXXXX 设成2G,就启动不起来,设小点就起来了,当时很气,怎么2G都起不了,今天在看到了一篇解释,转过来了这 次一位老友提出了这个问题,记得当年一个java高手在 ...

  8. sqlserver、mysql、oracle各自的默认端口号

    sqlserver默认端口号为:1433 URL:"jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=dbname" D ...

  9. cpu亲和力总结taskset和setcpu及其他相关

    一:taskset -- 获取或指定进程运行的CPU. man taskset出现 CPU affinity is a scheduler property that "bonds" ...

  10. Java图形化界面设计——容器(JFrame)

    Java图形化界面设计——容器(JFrame) 程序是为了方便用户使用的,因此实现图形化界面的程序编写是所有编程语言发展的必然趋势,在命令提示符下运行的程序可以让我们了解java程序的基本知识体系结构 ...