+ 2
Functions practice - Can I ask for help? C++
Can someone help me correct my code? Everybody says to practice a lot but I am blocked and don't know how to correct it. I can let it go and go to next lessons but I won't learn anything from this. I was always scared to ask for help and I am doing this for the first time. If my code is critically wrong, please be gentle about it :) I don't even know how to link my code so I hope any of below will work: https://code.sololearn.com/cHdodUb8zqkg/?ref=app https://www.sololearn.com/compiler-playground/cHdodUb8zqkg/#cpp
8 Answers
+ 2
https://code.sololearn.com/cO9kFbeVpupY/?ref=app
my friend check this and ask doubt from any character you have
+ 2
Thank you Jayakrishna and Snehil. I hope I didn't take too much of your time - you are very helpful.
Jayakrishna, I appreciate going extra mile and correcting my code without changing it too much - but making it work. It obviously needed some changes since mine didnt work.
Snehil, your code is so much cleaner than mine and you used adding function twice since it was unnecessary to make two functions that add. In case the last function would be for example division it would need 3 separate functions. And you did most of the job in the main, keeping the functions cleaner.
+ 2
Adam
Lot of changes may confuse you so just edited your code to work.
But always use concise, clear and simple names for variables to avoid confusion.. for the sake of readers also, Like @Snehil code .. Simple and straight forward..
you're welcome..
+ 1
Adam
You are not declared myFunctionResultAdd function.
Discuss your problems one by one detailly.. Don't be scare..
What is your task and what trouble you are getting..?
+ 1
Jayakrishna 🇮🇳 try checking the code once he has mentioned all stepwise
+ 1
Adam
See this... for anything if not understood, you can reply.....
https://code.sololearn.com/cc7BxvYmWl7K/?ref=app
+ 1
Adam never get afraid of asking questions again
0
You should Use pointers, your functions makes their own integers and works with them but not with main function's variables.