0

How do I convert decimal to other base using c++

I want to convert decimal to other base using c++

29th Sep 2021, 11:49 PM
Abraham John
14 Réponses
0
Abraham John Here's the user input variant Credits: @Martin Taylor https://code.sololearn.com/cF2pqByC1o0L/?ref=app
30th Sep 2021, 1:52 AM
Rishi
Rishi - avatar
+ 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 🙌😲
30th Sep 2021, 3:06 PM
Rishi
Rishi - avatar
+ 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?
2nd Oct 2021, 2:00 AM
Rishi
Rishi - avatar
+ 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/
30th Sep 2021, 12:06 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 2
Ipang he mentioned C++ in his question😗
30th Sep 2021, 1:43 AM
Rishi
Rishi - avatar
+ 1
Thanks for your help Martin Taylor really appreciate
30th Sep 2021, 2:05 AM
Abraham John
+ 1
Input: str = "1100", base = 2 Output: 12 Input: str = "11A", base = 16 Output: 282 Input: str = "123", base = 8 Output: 83
1st Oct 2021, 8:19 PM
Balogun Ayomiposi
Balogun Ayomiposi - avatar
0
I found some examples in the playground but it still not enough
30th Sep 2021, 1:40 AM
Abraham John
0
But I need to take input from the user?
30th Sep 2021, 1:50 AM
Abraham John
0
Rishi thanks but can you make it with switch statement where u get to convert from binary to other base
30th Sep 2021, 1:57 AM
Abraham John
0
Hi guys how can I make a programme for divide tow num
1st Oct 2021, 9:30 PM
عمار الفلاحي
عمار الفلاحي - avatar
0
Guys did u have a group in WhatsApp
1st Oct 2021, 9:30 PM
عمار الفلاحي
عمار الفلاحي - avatar
0
Okay bro
5th Oct 2021, 11:12 PM
عمار الفلاحي
عمار الفلاحي - avatar
0
C++
24th Feb 2023, 4:00 PM
عمار الفلاحي
عمار الفلاحي - avatar