Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  armstrong no calc
Language: C/C++
Code:
#include<stdio.h>
#include<math.h>
int main(void)
{
 int a,b,p,s=0;
for(a=10;a<200;a++)
{
 b=a;
 while(a>0)
{
 p=b%10;
 s=s+pow(p,3);
 b=b/10;
}
if(s==a)
 printf("%d is a armstrong non",a);
}
return(0);
}
          
Comments: