本文介绍了如何将十进制值转换为千位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下十进制数字,如下所示。请帮我把这个小数值转换成我在下面显示的格式:



double val = 2186382.34;

double val1 = 186382.34;

double val2 = 86382.34;

double val3 = 6382.34;

double val4 = 382.34;





我需要这种格式:



val = $ 2,186k;

val1 = $ 186k;

val2 = $ 86k;

val3 = $ 6k;

val4 = $ 382;

I have the following decimal number which i have shown below. Please help me to convert this decimal values to the format i have shown below:

double val = 2186382.34;
double val1 = 186382.34;
double val2 = 86382.34;
double val3 = 6382.34;
double val4 = 382.34;


I need in this format:

val = $2,186k;
val1 = $186k;
val2 = $86k;
val3 = $6k;
val4 = $382;

推荐答案




这篇关于如何将十进制值转换为千位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 19:41