answersLogoWhite

0

int RevNum( int num )

{

const int base = 10;

int result = 0;

do

{

result *= base;

result += num % base;

} while( num /= base);

return( result );

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

What is reversing key related to physics experiment?

a reversing key is used in the circuit to reverse the direction of current in the circuit.


You are a 4 digit number your thousands digit is twice your ones digit your hundreds digit is four times your thousands digit and your tens digit is the sum of your ones and thousands digit what numbe?

1.382 OR 0.000 or 2831


How do you separate digits in c plus plus?

Repeatedly divide the number by 10 and store the remainder (the modulo). By way of an example, if the number were 12345: 12345 % 10 = 5 (first digit) 12345 / 10 = 1234 1234 % 10 = 4 (second digit) 1234 / 10 = 123 123 % 10 = 3 (third digit) 123 / 10 = 12 12 % 10 = 2 (fourth digit) 12 / 10 = 1 (fifth digit) This algorithm forms the basis of number reversals. The following function demonstrates the most efficient way of reversing any number in the range -2,147,483,648 to 2,147,483,647, inclusive. int RevNum( int num ) { const int base = 10; int result = 0; int remain = 0; do { remain = num % base; result *= base; result += remain; } while( num /= base); return( result ); }


EBNF float data type?

<float_literals> -> <digit> { <digit> } [ . ] [ { <digit> } ] <digit> -> "0" | <digit excluding zero> <digit excluding zero> -> "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" hi dude i wish you are satisfied with my answer LOL ^^


Does reversing the polarity of a DC motor damage anything?

Reversing the polarity of a DC motor will not inherently damage it, as most DC motors are designed to operate in both directions. However, it can lead to issues if the motor is under load or if it is not designed for bidirectional operation. Additionally, reversing polarity may affect the motor controller or driver circuitry, potentially causing damage if they are not rated for such operation. Always consult the motor's specifications and the control circuitry documentation before reversing polarity.

Related Questions

Does reversing the order of the digits of a two digit prime number always result in a prime number?

No, reversing the order of the digits of a two-digit prime number does not always result in a prime number.


Does reversing the order of thedigits of a 2 digit prime number always result in a prime number?

No. For example, reversing 23 gets 32.


You are a two digit-prime number the number formed by reversing you digits are also prime your ones digit is 4 less than your tens digit what number are you?

73


You are a 2-digit prime number The number formed by reversing your digits is also prime your ones digit is 4 less than your tens digit What number are you?

73 7-3 = 4 73 is prime and 37 is prime.


The sum of any two-digit number and the number formed by reversing the digits is always divisible by what?

The sum of any two-digit number and the number formed by reversing the digits is always divisible by 11. This is because when you add a two-digit number to its reverse, the result will always be a multiple of 11. This is because the difference between the original number and its reverse is always a multiple of 9, and when you add two multiples of 9, the sum will always be a multiple of 11.


Do you always get a prime number when you rivers a two digit prime number?

No, and you do not even if you reverse them.


Why the float is used in cprogram?

It's one of the built-in data-types, a float-type variable can hold a floating-point number.


Does reversing the order of the digits of a 2 digit prime number always result in a prime number?

No because as for example 23 is a prime number but 32 is a composite number


What is cprogram code to insert a node in single link list?

Write Code to Insert a Node in a Single Linked List at any given Position.


The sum of the digits of a two digit number is 9 the number obtained by reversing the order of the digits of the gven numbers exceeds the given number by 27 find the given numbers?

3 and 6


How many reversing lights on a vw golf mk5?

There is one reversing light. There is one reversing light.


What is reversing number?

A reversing number is a number. Say 14. You reverse the numbers. Then the number will be 41. That is a reversing number.