Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- #include<math.h>
- int main()
- {
- int n, i, b=1,n1,d,sum=0;
- cout << "enter an no.";
- cin >> d;
- n=d;
- while(n!=0)
- {
- n1=n%10;
- for(i=n1;i>0;i--)
- {
- b=b*i;
- }
- sum+=b;
- n=n/10;
- b=1;
- }
- if(sum==d)
- cout<<"special";
- else
- cout<<"not";
- return 0;
- }
Add Comment
Please, Sign In to add comment