Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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
 
PREVIOUS NEXT
Tagged: #print #reverse #number
ADD COMMENT
Topic
Name
6+2 =