Search
 
SCRIPT & CODE EXAMPLE
 

CPP

print reverse number

void printReverse(int n) {
  if (n < 1) return;
  cout << n << endl;
  printReverse(n - 1);
}

printReverse(10);  /// 10 9 8 7 6 5 4 3 2 1
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ multiply char 
Cpp :: cmake g++ address sanitizer 
Cpp :: printing in column c++ 
Cpp :: pop off end of string c++ 
Cpp :: cpp vscode multipe compilation 
Cpp :: set iterator 
Cpp :: c++ check that const char* has suffix 
Cpp :: string concatenation operator overloading c++ 
Cpp :: C++ String Concatenation Example 
Cpp :: opengl draw house using glut c++ 
Cpp :: Ninja c++ 
Cpp :: c++ online compiler 
Cpp :: what is throw in c++ 
Cpp :: find nth fibonacci number 
Cpp :: ifstream 
Cpp :: time complexity 
Cpp :: Maximum sum of non consecutive elements 
Cpp :: convert single character string to char c++ 
Cpp :: phi function (n log (log(n))) 
Cpp :: kadane algorithm with negative numbers included as sum 
Cpp :: gcd in cpp 
Cpp :: c++ segmentation fault 
Cpp :: book allocation problem in c++ 
Cpp :: HMC 5883 Example to return x y z values 
Cpp :: c++ *agrs 
Cpp :: c++ to c converter tool 
Cpp :: gdb get return value of function 
Cpp :: input time from console C++ 
Cpp :: open url from dev cpp 
Cpp :: big o notation practice c++ 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =