Thursday 9 January 2014

HOW TO GET REVERSE DIGIT FROM YOUR GIVEN NO

#include<stdio.h>
#include<conio.h>
void main()
{
  int no,m,rev=0;
  clrscr();
  printf("\t\t\nEnter your value you want get reverse No.\n");
  scanf("%d",&no);
  while(no>0)
  {
    m=no%10;
    rev=(rev*10)+m;
    no=no/10;
    }
    printf("Reverse no %d",rev);
    getch();
}

No comments:

Post a Comment

How to change Background color by selecting color from Listview

activitymain.xml file::> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xm...