answersLogoWhite

0


Best Answer

You can get the answer in the following link : http://www.dreamincode.net/forums/showtopic27453.htm

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Reverse of a number in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you Write a C program to reverse an Integer number.?

Reference:cprogramming-bd.com/c_page2.aspx# reverse number


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); }


How you write a program in c plus plus to print plaindromic numbers from 1 to n?

To check if a number is a palindrome, reverse the number and see if it is equal to the original number. If so, the number is a palindrome, otherwise it is not. To reverse a number, use the following function: int reverse(int num, int base=10) { int reverse=0; while( num ) { reverse*=base; reverse+=num%base; num/=base; } return(reverse); }


How do you know that a numeric is palindrome or not using c or pascal language?

Reverse the digits then check of the new number is the same as the original number.


How do you make a programme in c language to get the reverse of any printed numberusing while loop or if conditional statement?

//Reverse of the Number // Programme Written By Maulin Thaker Ahmedabad; #include<stdio.h> #include<conio.h> void main() { int a,b,c,d,e; clrscr(); printf("Enter the Number to Find it's Reverse\n"); scanf("%d",&a); while(a!=0) { b=a%10; c=a/10; printf("%d",b); a=c; } getch(); }


What is the use of Reverse String in C program?

The use of the reverse string in C program is used to reverse the letters in the string. An example would be reverse me would be reversed to em esrever.


Write a C program to reverse the digits of a number?

/*Reverse the digits of a number,Gankidi*/ #include<stdio.h> void main(void) { int num,sum=0,i,rem; printf("Enter a number"); scanf("%d",&num); while(num>0) { rem=num%10; num=num/10; sum=sum+(rem*10); } printf("the reverse number is %d",sum); }


What is an Adams number?

If the reverse square root of the reverse of square of a number is the number itself then it is Adam Number. For ex., 12 and 21 Take 12 square of 12 = 144 reverse of square of 12 = 441 square root of the reverse of square of 12 = 21 The reverse square root of the reverse of square of 12 = 12, then number itself. Such number is called Adam Number. cool....................


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(); }


Why does the 1089 maths trick work?

let a, b, c denote the three digits of the original number, then the three-digit number is 100a+10b+c. The reverse is 100c+10b+a. Subtract: (100a+10b+c)-(100c+10b+a) to get 99(a-c). Since the digits were decreasing, (a-c) is at least 2 and no greater than 9, so the result must be one of 198, 297, 396, 495, 594, 693, 792, or 891. When you add any one of those numbers to the reverse of itself, you get 1089


How do you Write a program in 'c' language which accepts int numbers from the users print its reverse number x function which return value?

question clarity


A reverse phone number for my mobile?

There are a number of reverse phone number look up sites. Sprint has one that looks legitimate. You could also try www.free-cellphone-reverse-lookup.com