Coding Exercise on Recursion with Solution | C++ Placement Course | lecture 75

preview_player
Показать описание
In this lecture we will write a C++ program to find out sum of digits of a given number using Recursion and then we will dry run that program to understand the working properly.

*********************************************

Connect & Contact Me:

*******************************************

More Playlists:

Рекомендации по теме
Комментарии
Автор

Best beautiful and consistent teacher ever ❤❤❤❤....

Marvelkashmir
Автор

Mam plz make more and more questions on c++

snehasharma
Автор

Mam u teach so well that I don't feel like skipping the video

siddharthtiwari
Автор

Mam plz use dark mode for vs code and zoom a little bit.
Thankyou

LearningLabs
Автор

mam this is one of the best playlist but please make one playlist on oops in c++ and python also I'm follwing you from pakistan I have learn alot things in python thanks mam from the core of my heart ❤❤❤ and I get selected in one scholarship just because of you thanks once again

Waqaskhan-kvsl
Автор

#include<iostream>
using namespace std;
unsigned long long natural_no(int n);
int main()
{
while(true)
{

int n;
cout<<"Enter a number(0 to stop): ";
cin>>n;
cout<<"sum of 1 to
if(n==0)
{
break;
}
}
return 0;

}
unsigned long long natural_no(int n)
{
if(n==0)
{
return 0;
}
else
{
return n+natural_no(n-1);
}
}

anjaliraja-xpdf
Автор

the main function returns 0 implicitly, you don't actually have to write it out. :D
Edit: my code:

#include <iostream>
int re_sum_to(int n, int target) {
if (n == target)
return n;
return n + re_sum_to(n + 1, target);
}
int main() { std::cout << re_sum_to(1, 3) << '\n'; }

juanmacias
Автор

Mam when will you start Java basics to advance videos..! waiting for that

afnakurikkal
Автор

White Board aur Marker Wala feel aa nahi rha BUT badhiya h. 👍

Ihari_
Автор

Mam in the recent short you have uploaded..you told us to learn DSA.where can we learn DSA.i saw your channel and u uploaded a series about dsa.upto which level you taught in the series mam?did you teach advanced dsa in the series mam?are there any things which we should learn before learning dsa or we can directly learn dsa...iam engineering 1st year student.can i learn now or is it very early to learn that...please mam my mind filled with full of doubts and i dont know whom should i ask to clarify my doubts please reply

boddusomadinesh
Автор

Mam give an cs final year project ideas

Kokkihjkkkkhhaaq
Автор

All video's bahut acche the BUT ye sab bhi cover kar digiye PLZ...




9. Using Classes in C++

Principles of Object-Oriented Programming, Defining & Using Classes, Class Constructors,
Constructor Overloading, Function overloading in classes, Class Variables &Functions, Objects
as parameters, Specifying the Protected and Private Access, Copy Constructors, Overview of
Template classes and their use.


10. Overview of Function Overloading and Operator Overloading

Need of Overloading functions and operators, Overloading functions by number and type of
arguments, Looking at an operator as a function call, Overloading Operators (including
assignment operators, unary operators)


11. Inheritance, Polymorphism and Exception Handling

Introduction to Inheritance (Multi-Level Inheritance, Multiple Inheritance), Polymorphism (Virtual
Functions, Pure Virtual Functions), Basics Exceptional Handling (using catch and throw, multiple catch
statements), Catching all exceptions, Restricting exceptions, Rethrowing exceptions.

Ihari_
welcome to shbcf.ru