Module ArmstrongNumber Sub Main() Dim n, r, sum, t As Integer Console.Write("Enter a number= ") n = CInt(Console.ReadLine()) sum = 0 t = n While n <> 0 r = n Mod 10 sum += Math.Pow(r, 3) n = n \ 10 End While If sum = t Then Console.WriteLine(t.ToString + " is a Armstrong Number") Else Console.WriteLine(t.ToString + " is NOT an Armstrong Number") End If Console.ReadLine() End Sub End Module
Visual Basic dot net VB.net programming microsoft .net framework object oriented language network enabled technology visual basic 2005 IDE integrated development environment console application microsoft cre common runtime environment
Check whether the given number is Armstrong Number or not
Subscribe to:
Post Comments (Atom)
Thank You So much. . .
ReplyDeleteThank You So much very easy and understanding method :)
ReplyDeletethis only works for 3 digits number , can you make it work for longer numbers?
ReplyDeleteReplace the value of 3
Deletefor more than 3 ...replace the symbol / with \..
DeleteHey Willy just replace 3 with ur no or asign the num
ReplyDeletec++ math codings for beginners
ReplyDeleteVery informative article.Thank you author for posting this kind of article .
ReplyDeletehttp://www.wikitechy.com/view-article/c-program-to-check-armstrong-number-with-example-and-explanation
Both are really good,
Cheers,
Venkat
This comment has been removed by the author.
ReplyDeleteThis code will only work for 3 digit numbers so [sum += Math.Pow(r, 3)] need to be replaced with [sum+=(r*r*r)]
ReplyDeleteSo simple.Thanks
ReplyDeleteOutput where
ReplyDeletewhat is the meaning of this "<>" symbol ?
ReplyDeleteit only works with 3 digit number. How to use it with any number
ReplyDelete<> is not equal to
ReplyDeleteMere labtop par banate hai error a arahi hai yahi program Armstrong
ReplyDeletehttps://bayanlarsitesi.com/
ReplyDeleteŞirinevler
Kurtköy
Moda
Kavacık
6KG
Antalya
ReplyDeleteKonya
Adana
Ankara
Van
3QKCD2
Kocaeli Lojistik
ReplyDeleteUşak Lojistik
Osmaniye Lojistik
Çorlu Lojistik
Kocaeli Lojistik
5GDVH
E067F
ReplyDeleteYalova Parça Eşya Taşıma
Siirt Lojistik
Ordu Evden Eve Nakliyat
Bursa Evden Eve Nakliyat
Ordu Parça Eşya Taşıma
18F76
ReplyDeleteKastamonu Evden Eve Nakliyat
Yenimahalle Parke Ustası
Çerkezköy Ekspertiz
Kars Lojistik
Eskişehir Evden Eve Nakliyat
Giresun Parça Eşya Taşıma
Çerkezköy Oto Boya
Etimesgut Fayans Ustası
Mersin Parça Eşya Taşıma
71DF4
ReplyDeleteMuş Şehir İçi Nakliyat
Etlik Parke Ustası
Rize Şehirler Arası Nakliyat
Kütahya Parça Eşya Taşıma
Bursa Evden Eve Nakliyat
Bayburt Lojistik
Bingöl Şehir İçi Nakliyat
Tokat Şehir İçi Nakliyat
Balıkesir Şehirler Arası Nakliyat
DE891
ReplyDeletegümüşhane bedava sohbet uygulamaları
Bilecik Ücretsiz Görüntülü Sohbet
görüntülü sohbet kadınlarla
mobil sesli sohbet
ağrı sohbet
Kilis Sesli Sohbet Siteler
chat sohbet
Çanakkale Rastgele Görüntülü Sohbet Uygulaması
Bingöl Chat Sohbet
شركة مكافحة النمل الابيض بالاحساء CklHMP4Hhu
ReplyDeleteشركة شفط بيارات Dtyg25TD39
ReplyDelete