Armstrong Number

M_deepakkumar · September 23, 2020 · C++
#include <iostream>
using name space std;
class arm;
{
    int r,g,rem,y;
    public:
    void getdata();
    void checking();
};
   void arm::getdata()
   {
       cout<<"Enter the Number"<<endl;
       cin>>r;
   } 
   void arm::checking()
   {
       g=r;
       y=0;
       while(r!=0)
    {
        rem=r%10;
        y=rem+rem+rem;
        r=r/10;
    }
 

Comments

Please sign up or log in to contribute to the discussion.