answersLogoWhite

0

#include

#include

void main()

{

int rev num=0;

while(num>0)

{

rev num=rev num*10+num%10;

num=num%10;

}

return rev_num;

}

int main();

{

int num=4562;

printf("reverse of number is%d",reverse digit(num));

getch();

return o;

}

User Avatar

Wiki User

∙ 14y ago
User Avatar

What else can I help you with?

Continue Learning about Engineering

How do you write a program that outputs a given characters in reverse?

write the javascript code to display the reverse no. of given no. (e.g. 247 reverse of 742)


C program to check whether the number and its reverse are same or not?

#include <stdio.h> #include<conio.h> void main () { int a,r,n,sum=0; clrscr(); printf("enter the number"); scanf("%d",& n); c=n while (n!=0) { a=n%10; n=n/10; sum=sum*a+a } printf("the reverse is %d \n",sum); if(c==sum) printf("\n the given number is palindrome"); else printf("\n the given number is not a palindrome"); getch(); }


How do you convert a number that consist of alphabet and number in reverse order?

To reverse a number, first convert the number to a string, then reverse the string. Given your number consists of alphanumeric characters, the number must already be a string so simply reverse the string: #include<string> using std::string; string reverse (const string& s) { string str {}; for (auto c : s) str.insert (str.begin(), c); return str; } int main () { std::cout << "Enter a number: "; string s {}; std::cin >> s; std::cout << "The number in reverse is: " << reverse (s); }


Write a program to find the reverse of a given number with help of function?

//Reverse of the Number #include<stdio.h> #include<conio.h> int main () { int num,mod,rev=0; printf("Enter a number:"); scanf("%d", &num); while (num>0) { mod=num%10; rev=(rev*10)+mod; num=num/10; } printf("Reverse of the given number: %d", rev); getchar(); return 0; } // alternative solution based on reversing the alphanumeric representation of // the number: void rev(int me) { char alpha[32]; sprintf(alpha, "%d", me); for (const char* cp = alpha + strlen(alpha) - 1; cp >= alpha; --cp) { putchar(cp); } }


C program pointers to pointers examples?

Pointer to Pointer is a double pointer, denoted by (**). Pointer stores the address of the variable and pointer to pointer stores the address of a pointer variable and syntax can be given as int **ptr2ptr;

Related Questions

Fox pro program to reverse the given number?

reverse programe in fox pro


How do you write a program that outputs a given characters in reverse?

write the javascript code to display the reverse no. of given no. (e.g. 247 reverse of 742)


Enter a number and draw a flow chart to get the reverse of the given number and the number is 435?

123


To write shell program to check the given number and its reverse are same?

echo "enter the number" if [ $# -ne 1 ] then echo "Usage: $0 number" echo " I will find reverse of given number" echo " For eg. $0 12321, I will print 12321" exit 1 fi n=$1 rev=0 sd=0 while [ $n -gt 0 ] do sd=`expr $n % 10` rev=`expr $rev \* 10 + $sd` n=`expr $n / 10` done echo "Reverse number is $rev"


How can you generate a palindrome from a given number?

You write the number and then follow it with the digits in reverse order.


What can the reverse lookup be used to find?

The reverse lookup is a telephone number data base. Instead of looking up a phone number based on a given name, a name can be looked up based on a given phone number. It is useful when receiving phone calls from an unknown phone number.


What name is given to prime numbers that you can reverse to make another prime number?

A mirror prime.


C program to check whether the number and its reverse are same or not?

#include <stdio.h> #include<conio.h> void main () { int a,r,n,sum=0; clrscr(); printf("enter the number"); scanf("%d",& n); c=n while (n!=0) { a=n%10; n=n/10; sum=sum*a+a } printf("the reverse is %d \n",sum); if(c==sum) printf("\n the given number is palindrome"); else printf("\n the given number is not a palindrome"); getch(); }


Do an 8086 assembler program to find parity of a given number?

sdfsdfsfsggbcvbg


How do you convert a number that consist of alphabet and number in reverse order?

To reverse a number, first convert the number to a string, then reverse the string. Given your number consists of alphanumeric characters, the number must already be a string so simply reverse the string: #include<string> using std::string; string reverse (const string& s) { string str {}; for (auto c : s) str.insert (str.begin(), c); return str; } int main () { std::cout << "Enter a number: "; string s {}; std::cin >> s; std::cout << "The number in reverse is: " << reverse (s); }


Could you write a assembly language program in tasm To check whether a given number present in a sequence of given memory location containing the string to be checked in 8086?

8086 assembly language program to check wether given number is perfect or not


Program for finding the factorial of the two given number using constructor?

kjhk

Trending Questions
Why do you need a steam bypass control valve? Suppose that a node x is inserted into a red-black tree with rb-insert and then immediately deleted with rb-delete is the resulting red-black tree the same as the initial red-black tree justify your a? Can you use a headphone jack as an auxillary audio out jack? A machine made of more than one simple machine? What is the disadvantage of array in c? How many bytes can each of the in c plus plus language data type hold? What are the role of computer in improving banking operation in Nigeria? How do you Relate science and technology and society by giving instances where science and technology influences decision making? Working peinciple pf hydrualic cylinder? How do you put seals in hydraulic bottle jack? What is full film lubrication? I was trying to add a printer to my computer and it keeps on saying my Printer Spooler isn't working What is that? Write a program to create object without name? What happens if the implant is bent? How do bridges stay up? What is number system what are various number system explain with a suitable example? What does BASIC as in the programming language stand for? What is the exit diameter of a number 4 size gas tungsten arc welding nozzle? I can't download sony Vegas pro 10 free trial because when i try to run the installer is says configuration XML file is possibly corrupt how do i fix this? Can a 9 volt 300 ma AC adaptor be used on a 9 volt 200 ma device such as the Tama Rhythm Watch RW105 programmable metronome?