+ 5

Checkout my code and suggest me how can i shorten this?

https://code.sololearn.com/cDQ0KMOF8056/?ref=app

23rd Apr 2018, 8:45 AM
🇵🇰Naeem Anjum🇵🇰
🇵🇰Naeem Anjum🇵🇰 - avatar
7 Answers
23rd Apr 2018, 1:24 PM
🌛DT🌜
🌛DT🌜 - avatar
23rd Apr 2018, 10:23 AM
GAWEN STEASY
GAWEN STEASY - avatar
+ 5
Suggestions will be appreciated 😂😄
16th May 2018, 2:39 PM
Sadaam Linux
Sadaam Linux - avatar
+ 2
void binary(int num) { if (num == 0) { cout << '0'; return; } for (; num != 0; num /= 2) cout << num % 2; } You don't need bin (you never use it), and in this particular case, it's better to make dec unsigned.
23rd Apr 2018, 10:14 AM
Timon Paßlick
+ 1
Suggestions will be appreciated ;)
23rd Apr 2018, 8:45 AM
🇵🇰Naeem Anjum🇵🇰
🇵🇰Naeem Anjum🇵🇰 - avatar
+ 1
why you challenge me in html
14th May 2018, 3:30 PM
sidra Tabassum
sidra Tabassum - avatar
0
are u learnig c pluss pluss here??
14th May 2018, 3:26 PM
sidra Tabassum
sidra Tabassum - avatar