About 11,300,000 results
Open links in new tab
  1. Write a program to reverse digits of a number - GeeksforGeeks

    May 21, 2025 · # Python 3 program to reverse a number def reversDigits (n): # converting number to string s = str (n) # reversing the string s = s [::-1] # converting string to integer n = int (s) # …

  2. Algorithm and Flowchart to Print the Reverse of the Number

    Mar 21, 2021 · In this article, we will look at simple algorithm using which we can find the reverse of the number and also see its implementation in C [Pseudocode to Print the Reverse of the …

  3. The most efficient way to reverse a number - Stack Overflow

    You may convert the number to string and then reverse the string with STL algorithms. Code below should work: long number = 123456789; stringstream ss; ss << number; string …

  4. Algorithm to reverse a given number - DSA

    Algorithm to reverse a given number. 1. Read N. 2. Set REV:=0. 3. Repeat steps 5 and 6 while N>=0. 4. Set N:=N/10. 5. Set REV:=REV*10 + remainder. 6. Print the value of REV. 7. Exit.

  5. How to reverse a number mathematically. | by ManBearPig

    Nov 1, 2016 · Jackson Bates recently published an article describing how mathematical solutions can be thousands of times more efficient than their iterative or recursive counterparts. A useful …

  6. C Program To Reverse A Number | 6 Ways Explained With …

    In this article, we will explore an efficient approach to reverse a number using the C programming language. We will try to understand the algorithm, logic, and necessary programming skills. …

  7. C Program to Reverse A Number Using Different Methods

    Apr 12, 2025 · Understand the algorithm of a C program to reverse a number. Learn how to reverse a number in C using different methods and loops with example code.📖 Read on!

  8. Algorithm to Reverse a Number in C - Scaler

    Jul 8, 2021 · Explanation: The function reverse_number explains how to reverse a number in c using recursive calls, shrinking number by a factor of 10 each time, and accumulates the …

  9. C program to find reverse of a number using recursion

    Learn how to write a C program to find the reverse of a number using recursion. This guide covers the concept of recursion, a detailed algorithm, and complete code examples. Reversing a …

  10. Reverse a Number in C++ - GeeksforGeeks

    Sep 21, 2023 · Algorithm to Reverse Digits of a Number. Let us assume the number to be reversed is num and the reversed number will be stored in rev_num. Initialize rev_num = 0. …

Refresh