# help me for reverse number

Page 1 of 1

## 2 Replies - 286 Views - Last Post: 11 December 2012 - 06:23 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=303591&amp;s=e50047afa2b24011f0d12a7ff92fdb8c&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 jayveeeeeee

Reputation: -1
• Posts: 66
• Joined: 27-September 12

# help me for reverse number

Posted 11 December 2012 - 08:47 AM

can anyone can help just gave me an idea how to reverse it ,,please tell me what is the problem on my code

```;int i=0; int result = 0; int num=0; printf("enter number"); for(i=0; i<base; i++) scanf("%d", &a[i]); do {  result *= a[i];  result += num % a[i];  } while( num /= a[i]); return( result );  printf("reverse is %d" , result); getch(); } ']
```

```
#include<stdio.h>
#include<conio.h>
main()
{
const int base=10;
int a[base];int i=0;
int result = 0; int num=0;
printf("enter number");
for(i=0; i<base; i++)
scanf("%d", &a[i]);
do
{

result *= a[i];

result += num % a[i];

} while( num /= a[i]);
return( result );

printf("reverse is %d" , result);
getch();
}

```

This post has been edited by no2pencil: 11 December 2012 - 08:48 AM
Reason for edit:: Added Code Tags

Is This A Good Question/Topic? 0

## Replies To: help me for reverse number

### #2 no2pencil

• Professor Snuggly Pants

Reputation: 5912
• Posts: 28,937
• Joined: 10-May 07

## Re: help me for reverse number

Posted 11 December 2012 - 08:47 AM

If you can't take a minute or two to properly prepare a post asking for help so that it is legible code, what incentive do we have to help you?

### #3 jjl

• Engineer

Reputation: 1121
• Posts: 4,648
• Joined: 09-June 09

## Re: help me for reverse number

Posted 11 December 2012 - 06:23 PM

```;int i=0; int result = 0; int num=0; printf("enter number"); for(i=0; i<base; i++) scanf("%d", &a[i]); do {  result *= a[i];  result += num % a[i];  } while( num /= a[i]); return( result );  printf("reverse is %d" , result); getch(); } ']

```

Are you serious?