Get a guaranteed software dev job of ₹5-40 LPA | Apply now for free!

Wipro NLTH Coding Solve | Transmit Data | Codewindow.in

A company wishes to transmit data to another server. The data consists of numbers only. To secure the data during transmission, they plan to reverse the data first. Write an algorithm to reverse the data.

Input
The input consists of an integer data, representing the data to be transmitted.

Output
Print an integer representing the given data in reverse form.

Constraints
NA

Example

Input:
5783789

Output:
9873875

Explanation:
On reversing the given value, the output is 9873875.

#include <stdio.h>
int main()
{
    long int data;
    scanf("%ld", &data);
    while(data)
    {
        printf("%d",data%10);
        data=data/10;
    }
}

Also Checkout

Recent Posts