Computer Science, asked by Shreeyaharidas8529, 11 months ago

(C++) 1 #include 2 int power(int m,int n) 3 { 4 int j,i; 5 for(i=1,j=1;i<=n;i++) 6 j=j*m; 7 return j; 8 } 9 int arm(int n) 10 { 11 //Your code goes here 12 } 13 int main() 14 { 15 int n; 16 std::cin>>n; 17 if(arm(n)==1) 18 std::cout<<"Kindly proceed with encrypting"; 19 else 20 std::cout<<"It is not an Armstrong number"; 21 22 }

Answers

Answered by siva577346
1

Answer:

41>21

Explanation:

I entyrupted the question it's very. tough

Answered by MynkxB
0

Answer:

#include<iostream>

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)

{

  int r,v,z=0;

if(n/1000==0)

  v=3;

else v=4;

for(int i=n;i>0;i/=10)

  {

 r=i%10;  

 z=z+power(r,v);

  }

if(z==n)

 return 1;

}

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";

   

}

Similar questions