+ 1

Bon voyage c++

Bon voyage c++ recursive solution #include <iostream> using namespace std; void sum(int hours){ if(hours==0){ return; } sum(hours-1); int add = 0; add+=40*hours; cout<<add<<endl; } int main() { int distance = 0; //your code goes here sum(5); return 0; }

16th Aug 2022, 3:04 PM
SHUBHAM KUMAR
SHUBHAM KUMAR - avatar
4 Answers
+ 6
Please try to put questions to the problem Don't put answers share your code if there is any problem so that we all can help you However This question is asked by other people also you can refer that https://www.sololearn.com/Discuss/2687009/?ref=app https://www.sololearn.com/Discuss/2798097/?ref=app
16th Aug 2022, 3:33 PM
Suparna Das
Suparna Das - avatar
+ 6
SHUBHAM KUMAR This is a q&a section Here you should ask the questions related to the problems faced in the codes You can give answer to other people below there questions So don't put your answers in the question box 🙂
17th Aug 2022, 2:55 AM
Suparna Das
Suparna Das - avatar
+ 1
I had solved this and uploaded this a unique solution thanks but i am not asking the answer
16th Aug 2022, 6:18 PM
SHUBHAM KUMAR
SHUBHAM KUMAR - avatar
+ 1
Ok understood
17th Aug 2022, 5:24 AM
SHUBHAM KUMAR
SHUBHAM KUMAR - avatar