Skip to main content

Program to reverse a number and find the sum of individual digits. Also check for paliondrome.

#include<stdio.h>
main()
{
      int sum=0,rem,rev=0,t=0,n;
clrscr();
      printf("\nEnter an integer number");
      scanf("%d",&n);
      t=n;
      while(n>0)
      {
            rem=n%10;
            rev=rev*10+rem;
            sum=sum+rem;
            n=n/10;
      }
      printf("Sum of digits= %d\n",sum);
      printf("\nReverse of the digit is %d",rev);
      if(t==rev)
      {
            printf("\nPalindrome number");
      }
      else
      {
            printf("\nNot a Palindrome number\n");
      }
      getch();
}


Comments

Popular posts from this blog

HC Mac OS X Live DVD Highly Compressed 1.9 MB Free Download

Size : 1.9 MB HC Mac OS X Live DVD  Free Download Free Download HC Mac OS X Live DVD Free Download

Windows 7 For Android [apk] | Full Version | Free Download

Windows 7 For Android [apk] | Full Version | Free Download INFO Please Note: If you have a Motorola Phone with Motoblur please download "Moto Home Fix" by Nightshade Labs to choose the home application. It's finally here! Windows 7 for Android! You can now emulate Windows 7 on your Android device. This home application can replace the default home application (if desired) and allows you to access anything on your phone through Windows 7 for Android. No other application required! Unlike most home or theme applications that require Launcher Pro or similar apps. This means more memory for you and a quicker interface. This application includes many great features; task bar, start menu, widgets page, and of course the desktop. The task bar includes the main features of your device; the start button, the browser, messaging, dialer, and the launcher. The launcher gives you a list of all installed applications and allows you to pick one to run. The start menu allo...

Computer acronyms

ADSL - Asymmetric Digital Subscriber Line AGP - Accelerated Graphics Port ALI - Acer Labs, Incorporated ALU - Arithmetic Logic Unit AMD - Advanced Micro Devices APC - American Power Conversion ASCII - American Standard Code for Information Interchange ASIC - Application Specific Integrated Circuit ASPI - Advanced SCSI Programming Interface AT - Advanced Technology ATI - ATI Technologies Inc. ATX - Advanced Technology Extended --- B --- BFG - BFG Technologies BIOS - Basic Input Output System BNC - Barrel Nut Connector --- C --- CAS - Column Address Signal CD - Compact Disk CDR - Compact Disk Recorder CDRW - Compact Disk Re-Writer CD-ROM - Compact Disk - Read Only Memory CFM - Cubic Feet per Minute (ft�/min) CMOS - Complementary Metal Oxide Semiconductor CPU - Central Processing Unit CTX - CTX Technology Corporation (Commited to Excellence) --- D --- DDR - Double Data Rate DDR-SDRAM - Double Data Rate - Synchronous Dynamic Random Access Memory DFI - DFI ...