This is the correct answer of your problem. This is not the correct place to ask your problems. You are a paid students and you can ask your questions directly on moodle.learnbywatch.com
Forums are available for you at moodle.learnbywatch.com please go there and start discussions about your problem. Thank you.
int main()
{
int num, i, rev_num;
printf("Enter a four digit number:");
scanf("%d",&num);
printf("You entered :%d",num);
i = num % 10;
rev_num = i * 1000;
num = num / 10;
i = num % 10;
rev_num = rev_num + i * 100;
num = num / 10;
i = num % 10;
rev_num = rev_num + i * 10;
num = num / 10;
i = num % 10;
rev_num = rev_num + i * 1;
printf("Reverse number %d",rev_num);
getch();
}
Dear. Mr. Parveen.
This is the correct answer of your problem. This is not the correct place to ask your problems. You are a paid students and you can ask your questions directly on moodle.learnbywatch.com
Forums are available for you at moodle.learnbywatch.com please go there and start discussions about your problem. Thank you.
Yogendra Pal
Learn By Watch
yogendra@learnbywatch.com