diff --git a/C#/c# b/C#/c# new file mode 100644 index 0000000..45ce758 --- /dev/null +++ b/C#/c# @@ -0,0 +1,21 @@ +using System; + public class ArmstrongExample + { + public static void Main(string[] args) + { + int n,r,sum=0,temp; + Console.Write("Enter the Num= "); + n= int.Parse(Console.ReadLine()); + temp=n; + while(n>0) + { + r=n%10; + sum=sum+(r*r*r); + n=n/10; + } + if(temp==sum) + Console.Write("Armstrong Num."); + else + Console.Write("Not Armstrong Num."); + } + }