daily pastebin goal
62%
SHARE
TWEET

Untitled

a guest Dec 18th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class sum
  2.     {int a;
  3.     public: sum(int aa):a(aa) {}
  4.  
  5.     int proc1 ();
  6.     int proc2 ();
  7.     };
  8.  
  9. int sum:: proc1()
  10.     {
  11.     if (floor(a)==a) return (a);
  12.     else return (0);
  13.  
  14.     }
  15.  int sum:: proc2()
  16.     { int m=0, k=a;
  17.      while (k > 0)
  18.        {
  19.         m= m + a%10;
  20.         k= k/10;
  21.         }
  22.      return(m);
  23.      }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top