void main()
{
int *n,a,r=0;
clrscr();
printf("enter any no to get its reverse: ");
scanf("%d",&*n);
while(*n>=1)
{
a=*n%10;
r=r*10+a;
*n=*n/10;
}
printf("reverse=%d",r);
getch();
}
Output:
enter any no to get its reverse: 456
reverse=654
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?
write the javascript code to display the reverse no. of given no. (e.g. 247 reverse of 742)
Here is the algorithm of the algorithm to write an algorithm to access a pointer in a variable. Algorithmically.name_of_the_structure dot name_of_the _field,eg:mystruct.pointerfield
write a c++ program to convert binary number to decimal number by using while statement
write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program
Reference:cprogramming-bd.com/c_page2.aspx# reverse number
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?
write the javascript code to display the reverse no. of given no. (e.g. 247 reverse of 742)
Here is the algorithm of the algorithm to write an algorithm to access a pointer in a variable. Algorithmically.name_of_the_structure dot name_of_the _field,eg:mystruct.pointerfield
In python, type the following into a document. NOTE: Sentences following a # symbol are comments, and are not necessary for the program to run. #!/usr/bin/python #This program takes a input from a user and reverses it. number = input("Type a number: ") #This takes input from a user. a = len(number) #This finds the length of the number reverse = "" #This sets the variable reverse to an empty string. for i in number: a = a-1 #The places in a string start from 0. The last value will be the length minus 1.reverse = reverse + number[a] #Makes the number's last digit the new string's first. print("The reverse of", number, "is", reverse + ".") #prints the resulting string. This program will take any sequence of characters and reverse them. The final value is a string, but if an integer is needed, one needs only to add the line reverse = int(reverse) above the print statement. However, this will stop the program from being able to reverse strings, as it is not possible to convert a string to an integer if it is not a number.
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); }
i am sam
abdulrahman
question clarity
Write a program to convert a 2-digit BCD number into hexadecimal
mano ni anda yarrr
You write the number and then follow it with the digits in reverse order.