you just carry the first number and add 5 to the second number
whats the answer please??
38
Your answer is, depending on the order of your subtraction, either positive or negative 198
if you mean to make the number negative, assuming the number is positive to start with, you can assign the number to X and then do X-(2X) No, they want to reverse the order of the digits. There are two problems with that: 1. it is their homework, so they should do it themself 2. one can't draw flowcharts here
you just carry the first number and add 5 to the second number
whats the answer please??
34.
You write the number and then follow it with the digits in reverse order.
38
Some numbers that you can get when you reverse the digits and they are still prime numbers are: 403 ÷ 13 = 31 2,701 ÷ 37 = 73 1,207 ÷ 17 = 71
72 reverse the digits divide by 3 = 24
Your answer is, depending on the order of your subtraction, either positive or negative 198
The number is 21978. 21978 when multiplied by 4 which gives the result 87912 which is in reverse order.
if you mean to make the number negative, assuming the number is positive to start with, you can assign the number to X and then do X-(2X) No, they want to reverse the order of the digits. There are two problems with that: 1. it is their homework, so they should do it themself 2. one can't draw flowcharts here
The most efficient method is to reverse the digits in the number and then check if the reversed number is equal to the original number. In C, we can implement this as follows (using long-hand notation for clarity). Note the use of base (defaulting to base 10) so that we can check values in other bases. bool is_palindrome (unsigned num, unsigned base = 10) { // local variables unsigned rev, digit, digits; // copy the input number digits = num; // initialise the accumulator rev = 0; // repeat while there are digits while (digits) { // extract the low-order digit using modulo (%) operator digit = digit % base; // shift the accumulated digits (if any) one position to the left rev = rev * base; // add on the new digit rev = rev + digit; // shift the remaining digits one position to the right digits = digits / base; } // end while // return true if the number and its reverse are equal return num == rev; }
/*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); }