+ 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

25th Mar 2023, 3:24 PM
Adam Olejniczak
8 Answers
+ 2
https://code.sololearn.com/cO9kFbeVpupY/?ref=app my friend check this and ask doubt from any character you have
25th Mar 2023, 3:45 PM
Just Some Random Guy
Just Some Random Guy - avatar
+ 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.
25th Mar 2023, 4:22 PM
Adam Olejniczak
+ 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..
25th Mar 2023, 4:29 PM
Jayakrishna 🇮🇳
+ 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..?
25th Mar 2023, 3:50 PM
Jayakrishna 🇮🇳
+ 1
Jayakrishna 🇮🇳 try checking the code once he has mentioned all stepwise
25th Mar 2023, 3:52 PM
Just Some Random Guy
Just Some Random Guy - avatar
+ 1
Adam See this... for anything if not understood, you can reply..... https://code.sololearn.com/cc7BxvYmWl7K/?ref=app
25th Mar 2023, 4:09 PM
Jayakrishna 🇮🇳
+ 1
Adam never get afraid of asking questions again
25th Mar 2023, 4:23 PM
Just Some Random Guy
Just Some Random Guy - avatar
0
You should Use pointers, your functions makes their own integers and works with them but not with main function's variables.
27th Mar 2023, 4:11 AM
Сергей Лансков
Сергей Лансков - avatar