# Armstrong Number and how to check it with C#

In number theory, a narcissistic number or “Armstrong number” is a number where in a given number base b is a number that is the sum of its own digits each raised to the power of the number of digits. This definition is way more complicated than it actually is. Check out this example

[/fusion_text][fusion_title title_type=”text” rotation_effect=”bounceIn” display_time=”1200″ highlight_effect=”circle” loop_animation=”off” highlight_width=”9″ highlight_top_margin=”0″ before_text=”” highlight_text=”” after_text=”” content_align=”left” size=”3″ font_size=”” animated_font_size=”” line_height=”” letter_spacing=”” text_color=”” animated_text_color=”” highlight_color=”” style_type=”none” sep_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” fusion_font_variant_title_font=””]Example for an Armstrong number[/fusion_title][fusion_imageframe image_id=”4019|medium” max_width=”256″ style_type=”” blur=”” stylecolor=”” hover_type=”none” bordersize=”0″ bordercolor=”” borderradius=”” align=”left” lightbox=”no” gallery_id=”” lightbox_image=”” lightbox_image_id=”” alt=”” link=”” linktarget=”_self” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” filter_hue=”0″ filter_saturation=”100″ filter_brightness=”100″ filter_contrast=”100″ filter_invert=”0″ filter_sepia=”0″ filter_opacity=”100″ filter_blur=”0″ filter_hue_hover=”0″ filter_saturation_hover=”100″ filter_brightness_hover=”100″ filter_contrast_hover=”100″ filter_invert_hover=”0″ filter_sepia_hover=”0″ filter_opacity_hover=”100″ filter_blur_hover=”0″]https://tutorials.eu/wp-content/uploads/2020/07/Armstrong-example-300×300.png[/fusion_imageframe][fusion_imageframe image_id=”4020|medium” max_width=”256″ style_type=”” blur=”” stylecolor=”” hover_type=”none” bordersize=”” bordercolor=”” borderradius=”” align=”right” lightbox=”no” gallery_id=”” lightbox_image=”” lightbox_image_id=”” alt=”” link=”” linktarget=”_self” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” filter_hue=”0″ filter_saturation=”100″ filter_brightness=”100″ filter_contrast=”100″ filter_invert=”0″ filter_sepia=”0″ filter_opacity=”100″ filter_blur=”0″ filter_hue_hover=”0″ filter_saturation_hover=”100″ filter_brightness_hover=”100″ filter_contrast_hover=”100″ filter_invert_hover=”0″ filter_sepia_hover=”0″ filter_opacity_hover=”100″ filter_blur_hover=”0″]https://tutorials.eu/wp-content/uploads/2020/07/not-Armstrong-example-300×300.png[/fusion_imageframe][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”default” rule_size=”” rule_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]

The first image shows an Armstrong number.
The second image shows a number that is not an Armstrong number.

[/fusion_text][fusion_title title_type=”text” rotation_effect=”bounceIn” display_time=”1200″ highlight_effect=”circle” loop_animation=”off” highlight_width=”9″ highlight_top_margin=”0″ before_text=”” highlight_text=”” after_text=”” content_align=”left” size=”3″ font_size=”” animated_font_size=”” line_height=”” letter_spacing=”” text_color=”” animated_text_color=”” highlight_color=”” style_type=”none” sep_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” fusion_font_variant_title_font=””]List of Armstrong numbers between 1 and 100000[/fusion_title][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”default” rule_size=”” rule_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]

• 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 8208, 9474, 54748

[/fusion_text][fusion_title title_type=”text” rotation_effect=”bounceIn” display_time=”1200″ highlight_effect=”circle” loop_animation=”off” highlight_width=”9″ highlight_top_margin=”0″ before_text=”” highlight_text=”” after_text=”” content_align=”left” size=”3″ font_size=”” animated_font_size=”” line_height=”” letter_spacing=”” text_color=”” animated_text_color=”” highlight_color=”” style_type=”none” sep_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” fusion_font_variant_title_font=””]The largest known Armstrong number is[/fusion_title][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”default” rule_size=”” rule_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]

115,132,219,018,763,992,565,095,597,973,971,522,401

[/fusion_text][fusion_title title_type=”text” rotation_effect=”bounceIn” display_time=”1200″ highlight_effect=”circle” loop_animation=”off” highlight_width=”9″ highlight_top_margin=”0″ before_text=”” highlight_text=”” after_text=”” content_align=”left” size=”2″ font_size=”” animated_font_size=”” line_height=”” letter_spacing=”” text_color=”” animated_text_color=”” highlight_color=”” style_type=”none” sep_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” fusion_font_variant_title_font=””]C# Program to check if a number is an Armstrong number[/fusion_title][fusion_title title_type=”text” rotation_effect=”bounceIn” display_time=”1200″ highlight_effect=”circle” loop_animation=”off” highlight_width=”9″ highlight_top_margin=”0″ before_text=”” rotation_text=”” highlight_text=”” after_text=”” content_align=”left” size=”3″ font_size=”” animated_font_size=”” line_height=”” letter_spacing=”” text_color=”” animated_text_color=”” highlight_color=”” style_type=”none” sep_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” fusion_font_variant_title_font=””]

Project Setup

[/fusion_title][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”default” rule_size=”” rule_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]

• Create a new project in the visual studio 2019.
• Select the C# Project Template – [ Console App .NET Framework]
• Configure your new project with a name “Armstrong”, set location, and solution file with a name “Armstrong”.
• When a new project created automatically generated with the basic structure of the program.

[/fusion_text][fusion_title title_type=”text” rotation_effect=”bounceIn” display_time=”1200″ highlight_effect=”circle” loop_animation=”off” highlight_width=”9″ highlight_top_margin=”0″ before_text=”” highlight_text=”” after_text=”” content_align=”left” size=”4″ font_size=”” animated_font_size=”” line_height=”” letter_spacing=”” text_color=”” animated_text_color=”” highlight_color=”” style_type=”none” sep_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” fusion_font_variant_title_font=””]Code[/fusion_title][fusion_syntax_highlighter theme=”” language=”x-php” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” font_size=”” border_size=”” border_color=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]dXNpbmcgU3lzdGVtOwoKbmFtZXNwYWNlIEFybXN0cm9uZwp7CiAgICBjbGFzcyBQcm9ncmFtCiAgICB7CiAgICAgICAgcHVibGljIHN0YXRpYyB2b2lkIE1haW4oc3RyaW5nW10gYXJncykKICAgICAgICB7CiAgICAgICAgICAgIC8vU3RvcmVzIGlucHV0IG51bWJlciBpbiB0aGUgdmFyaWFibGUgb3JpZ2luYWxOdW1iZXIKICAgICAgICAgICAgaW50IG9yaWdpbmFsTnVtYmVyOwoKICAgICAgICAgICAgLy9TdG9yZXMgc2luZ2xlIGRpZ2l0IG9mIHRoZSBnaXZlbiBudW1iZXIuCiAgICAgICAgICAgIGludCByZW1haW5kZXI7CgogICAgICAgICAgICAvL1N0b3JlcyBzdW0gb2YgZGlnaXRzIG9mIHRoZSBnaXZlbiBudW1iZXIuCiAgICAgICAgICAgIGludCBzdW0gPSAwOwoKICAgICAgICAgICAgLy9UaGlzIHR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RlciAqIHJlbWFpbmRlciAqIHJlbWFpbmRlcik7CiAgICAgICAgICAgICAgICBvcmlnaW5hbE51bWJlciA9IG9yaWdpbmFsTnVtYmVyIC8gMTA7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIC8vQ29tcGFyZSB0aGUgdmFsdWUgb2YgdGVtcE51bWJlciBhbmQgYSBzdW0gdmFyaWFibGUuCiAgICAgICAgICAgIGlmICh0ZW1wTnVtYmVyID09IHN1bSkKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgLy9JZiB0aGUgdmFsdWUgb2YgdGhlIHRlbXBOdW1iZXIgYW5kIHRoZSBzdW0gdmFyaWFibGUgYXJlIHNhbWUgdGhlbiBpdCBpcyBhbiBhcm1zdHJvbmcgbnVtYmVyCiAgICAgICAgICAgICAgICBDb25zb2xlLldyaXRlKCJFbnRlcmVkIE51bWJlciBpcyBhbiBBcm1zdHJvbmcgTnVtYmVyLiIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgLy9JZiB0aGUgdmFsdWUgb2YgdGhlIHRlbXBOdW1iZXIgYW5kIHRoZSBzdW0gdmFyaWFibGUgYXJlIHNhbWUgdGhlbiBpdCBpcyBub3QgYW4gYXJtc3Ryb25nIG51bWJlcgogICAgICAgICAgICAgICAgQ29uc29sZS5Xcml0ZSgiRW50ZXJlZCBOdW1iZXIgaXMgbm90IGFuIEFybXN0cm9uZyBOdW1iZXIuIik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgQ29uc29sZS5Xcml0ZSgiXG4iKTsKICAgICAgICB9CiAgICB9Cn0=[/fusion_syntax_highlighter][fusion_title title_type=”text” rotation_effect=”bounceIn” display_time=”1200″ highlight_effect=”circle” loop_animation=”off” highlight_width=”9″ highlight_top_margin=”0″ before_text=”” highlight_text=”” after_text=”” content_align=”left” size=”3″ font_size=”” animated_font_size=”” line_height=”” letter_spacing=”” text_color=”” animated_text_color=”” highlight_color=”” style_type=”none” sep_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” fusion_font_variant_title_font=”” /][fusion_title title_type=”text” rotation_effect=”bounceIn” display_time=”1200″ highlight_effect=”circle” loop_animation=”off” highlight_width=”9″ highlight_top_margin=”0″ before_text=”” highlight_text=”” after_text=”” content_align=”left” size=”3″ font_size=”” animated_font_size=”” line_height=”” letter_spacing=”” text_color=”” animated_text_color=”” highlight_color=”” style_type=”none” sep_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” fusion_font_variant_title_font=”” /][fusion_title title_type=”text” rotation_effect=”bounceIn” display_time=”1200″ highlight_effect=”circle” loop_animation=”off” highlight_width=”9″ highlight_top_margin=”0″ before_text=”” rotation_text=”” highlight_text=”” after_text=”” content_align=”left” size=”2″ font_size=”” animated_font_size=”” line_height=”” letter_spacing=”” text_color=”” animated_text_color=”” highlight_color=”” style_type=”none” sep_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” fusion_font_variant_title_font=””]Advanced Version of a C# Programm for the Amstrong Number[/fusion_title][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”default” rule_size=”” rule_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]

Here we add few code lines to see what actually happens.

[/fusion_text][fusion_syntax_highlighter theme=”” language=”x-php” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” font_size=”” border_size=”” border_color=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]dXNpbmcgU3lzdGVtOwoKbmFtZXNwYWNlIEFybXN0cm9uZwp7C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9CiAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgLy9JZiB0aGUgdmFsdWUgb2YgdGhlIHRlbXBOdW1iZXIgYW5kIHRoZSBzdW0gdmFyaWFibGUgYXJlIG5vdCB0aGUgc2FtZSB0aGVuIGl0IGlzIG5vdCBhbiBhcm1zdHJvbmcgbnVtYmVyCiAgICAgICAgICAgICAgICBDb25zb2xlLldyaXRlKCJFbnRlcmVkIE51bWJlciBpcyBub3QgYW4gQXJtc3Ryb25nIE51bWJlci4iKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KfQ==[/fusion_syntax_highlighter][fusion_title title_type=”text” rotation_effect=”bounceIn” display_time=”1200″ highlight_effect=”circle” loop_animation=”off” highlight_width=”9″ highlight_top_margin=”0″ before_text=”” rotation_text=”” highlight_text=”” after_text=”” content_align=”left” size=”1″ font_size=”” animated_font_size=”” line_height=”” letter_spacing=”” text_color=”” animated_text_color=”” highlight_color=”” style_type=”default” sep_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]Summary for Armstrong Number with C#[/fusion_title][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”default” rule_size=”” rule_color=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]Now you see how the Armstrong number works, and how you can write a C# Programm that checks if a given number is an Armstrong Number, or not.[/fusion_text][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]