0
How do I convert decimal to other base using c++
I want to convert decimal to other base using c++
14 Réponses
0
Abraham John
Here's the user input variant
Credits: @Martin Taylor
https://code.sololearn.com/cF2pqByC1o0L/?ref=app
+ 3
fweafwawa wow that was really really helpful. I'm really amazed how you're being such helpful. Actually I'm jealous of your helpfulness. Teach me how to be so helpful like you 🙌😲
+ 3
عمار الفلاحي
We are not connected on WhatsApp. Also, if you want to ask a question, search the question to see if anyone already asked it. If not, create a new post, don't ask in someone else's question.
Also, in which language you wanna make the program?
+ 2
You could output decimal as any base with setting different ios flags
Something like:
cout << hex << showbase << 15;
Other than output no matter which base you use the number will be considered the same. But if you want to convert string of binary number to decimal and vise versa or something like that, here is what you need:
https://www.google.com/amp/s/www.geeksforgeeks.org/convert-base-decimal-vice-versa/amp/
+ 2
Ipang he mentioned C++ in his question😗
+ 1
Thanks for your help Martin Taylor really appreciate
+ 1
Input: str = "1100", base = 2
Output: 12
Input: str = "11A", base = 16
Output: 282
Input: str = "123", base = 8
Output: 83
0
I found some examples in the playground but it still not enough
0
But I need to take input from the user?
0
Rishi thanks but can you make it with switch statement where u get to convert from binary to other base
0
Hi guys how can I make a programme for divide tow num
0
Guys did u have a group in WhatsApp
0
Okay bro
0
C++