Convert this Java class to C++ 17
£10-20 GBP
Paid on delivery
I need this class converted to c++
The purpose of this class is to input a number and get the names
i.e 1000 = 1k, 1100 = 1.1k, 100000 = 100k, 1000000 = 1m 1100000 1.1m and so on
public class NumberNames {
private static final String[] NAMES = new String[]{
"K",
"M",
"B",
"T",
"Quadrillion",
"Quintillion",
"Sextillion",
"Septillion",
"Octillion",
"Nonillion",
"Decillion",
"Undecillion",
"Duodecillion",
"Tredecillion",
"Quattuordecillion",
"Quindecillion",
"Sexdecillion",
"Septendecillion",
"Octodecillion",
"Novemdecillion",
"Vigintillion",
};
private static final double THOUSAND = 1000;
private static final NavigableMap<Double, String> MAP;
static {
MAP = new TreeMap<>();
for (int i = 0; i < [login to view URL]; i++) {
[login to view URL]([login to view URL](THOUSAND, i + 1), NAMES[i]);
}
}
public static String createString(Double number) {
if(number == null) {
number = 0.0;
}
[login to view URL]<Double, String> entry = [login to view URL](number);
if (entry == null) {
return [login to view URL]();
}
double key = [login to view URL]();
double d = key / THOUSAND;
Double m = number / d;
float f = [login to view URL]() / 1000.0f;
float rounded = ((int) (f * 100.0)) / 100.0f;
if (rounded % 1 == 0) {
return ((int) rounded) + " " + [login to view URL]();
}
return rounded + " " + [login to view URL]();
}
}
Project ID: #22796779
About the project
10 freelancers are bidding on average £21 for this job
Hi. I would like to do this project for you. I am quite good with both, Java and C++ and I can do this quickly. Message me to discuss more details about your project
Hello, ⭐⭐⭐⭐⭐ i am interested in this project , i can convert this class to c++ easily can begin now waiting your answer on chat Regards ⭐⭐⭐⭐⭐
Hello, I'm interested in your project. Please send me a message so that we can discuss more. I prefer to submit my detailed proposal after our discussion. Note: + We are flexible with changes. + [login to view URL] More
Hi I can do it for you it is quite simple, send me a private message and we can discuss the details
Dear Client, How are you doing?. I have read the description, I have great experience doing similar jobs related to these skills Algorithm,java,C# Programming, C++ Programming, FIX API, Software Architecture. Right no More