Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Armstrong
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int number, remainder, sum = 0; Console.Write("enter the Number"); number = int.Parse(Console.ReadLine()); for (int i = number; i > 0; i = i / 10) { remainder = i % 10; sum = sum + remainder*remainder*remainder; } if (sum == number) { Console.Write("Entered Number is an Armstrong Number"); } else Console.Write("Entered Number is not an Armstrong Number"); Console.ReadLine(); } } }
run
|
edit
|
history
|
help
0
Decrypt Encrypt
Математика
Min Max Sum Avg
float to short cast overflow
matrix function
AAAXACAdxcd
project euler 11, C#
pattern
Scheduler NLog config
Concurrent bag ex