Sunday, 15 January 2012

Program To Find Separate Number Of Digits In C++


#include<iostream.h>
#include<conio.h>
 main()
 {
 clrscr();
 cout<<"Enter number=";
 cin>>a;
 b=a/10;
 c=a%10;
 d=b/10;
 e=b%10;
 cout<<"\n one place="<<c<<endl;
  cout<<"\n Tenth place="<<e<<endl;
   cout<<"\n Hundred place="<<d<<endl;
   getch();
   }

No comments:

Post a Comment