| 7 | #define endl '\n' |
| 8 | |
| 9 | int main(){ |
| 10 | cin.tie(0)->sync_with_stdio(0); |
| 11 | int n; |
| 12 | cin>>n; |
| 13 | int temp=n; |
| 14 | int tmep2=n; |
| 15 | int sum=0; |
| 16 | int digit=0; |
| 17 | while(n!=0){ |
| 18 | digit++; |
| 19 | n/=10; |
| 20 | } |
| 21 | while(temp!=0){ |
| 22 | int ss=temp%10; |
| 23 | sum+=pow(ss,digit); |
| 24 | temp/=10; |
| 25 | |
| 26 | |
| 27 | } |
| 28 | if(sum==tmep2){ |
| 29 | cout<<"it is armstrong numbr"<<endl; |
| 30 | |
| 31 | } |
| 32 | else |
| 33 | cout<<"its not "<<endl; |
| 34 | |
| 35 | return 0; |
| 36 | } |
nothing calls this directly
no outgoing calls
no test coverage detected