#include <iostream> using namespace std; int Sum(int N,int sum) { if(N<=0) { return sum; } sum=sum+(N%10); int ans =Sum(N/10,sum); return ans; } int main() { int N; cin>>N; int y= Sum(N,0); cout<<y; return 0; }
In this post I am gonna tell you How To Format Your Pendrive Using CMD. With the increase in technological advancements the use of data transfer medium has also increased.
Introduction: Given a graph and a source vertex in graph, find shortest paths from source to all vertices in the given graph. Let's take a real life example:
Comments
Post a Comment