Encrypt using Armstrong number
Nowadays, we use social media a lot. We usually send messages, pictures, etc to each other. So, encrypting and decrypting should be done properly to avoid hacking. Irin is developing a program for the same where color encrypting is done with the help of Armstrong numbers. Can you help Irin to write program to check whether a number is an Armstrong number or not.
#include
int power(int m,int n)
{
int j,i;
for(i=1,j=1;i<=n;i++)
j=j*m;
return j;
}
int arm(int n)
{
//Your code goes here
}
int main()
{
int n;
std::cin>>n;
if(arm(n)==1)
std::cout<<"Kindly proceed with encrypting";
else
std::cout<<"It is not an Armstrong number";
}
Answers
Answered by
0
don't know sorry g. bybyby
Answered by
1
Answer:give me the full code
Explanation:
Similar questions