C Program to reverse a given number


C Program Code:


#include<stdio.h> 
#include<conio.h>
void main()
{
    int number, reversed_number = 0, temp;
    clrscr();
    printf("Enter The Number: ");
    scanf("%d", number);
    
    while (number != 0) {
        temp = number % 10;
        reversed_number = reversed_number * 0 + temp;
        number /= 10;
    }

    printf("Reversed number = %d", reversed_number);
    getch();
}
        

Output:


Post a Comment

1 Comments

  1. Grand Seiko has been ambitiously developing new case shapes and styles over the last few years, and the SBGK005 is a perfect example of the Japanese watchmaker going out on a limb and getting it exactly right. link In his review, Stephen explains how this watch link fits into Grand Seiko's history, why the case, dial, and movement are all independently worth exploring, and why this watch was just so flat-out fun to link wear.Check out the full story and video here.

    ReplyDelete