#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; }
Have you seen the movie "Matrix"?This matrix effect is inspired by that movie only.This effect is one of the fascinating capabilities of cmd (which is ignored most often by us) Copy and paste this code in your Notepad and Save the file as "Matrix.bat".
Comments
Post a Comment