Decimal to Octal
https://code.sololearn.com/ca10A34A08A2 If I enter 15 as input, it should be 17 in octal. I think I am doing something wrong with the array size that's why after 17 some random values are showing off.
Your decimaltooctal function is not returning anything but you are trying to print returned values. That's why you are getting garbage values. If you wants to print your values using cout in main() then return the converted value from your function https://code.sololearn.com/cds0E8AEVrPM/?ref=app
@Martin Thanks @Shail murtaza I want to learn by practicing..I am tired of watching videos,reading chapters even though sometimes it is hard for me to understand the language..so through practicing I am trying at least to learn C++.I know my style of doing code is like the dumbest way but at the same time I am curious to know why it is the dumbest and that is how I want to learn.It's like learning both multiplication and addition as well.
Ramisa Fariha Ok. It's totally up to you how you learn. 👍👍 But at start I was learning the same way you are. After some time I realized that this is just more time consuming and inefficient. Learning basics of programming language made it easy to learn advance things properly and I was learning faster then before. And at the same time I was writing good codes then before. That was just an advice.
@Martin thank you so much
Ramisa Fariha I guess you are trying to sort things in C++ without knowing the basic knowledge It's like learning multiplication without knowing addition.
@Martin bitset<sizeof(int)*8> b(x); This line is converting octal to binary ..what is the use of bitset and also showbase?
I have made a calculator in which my % (Percentage) not work correctly for 100%50 or 100%20.
Python palindrome challenge.
I have a problem in html in the third practice in the third lesson there is a cv project how will I do they said wrap the code u