answersLogoWhite

0

Dim no As Integer, r As Integer, sum As Integer = 0, n As Integer = 0


Console.WriteLine("Enter number" & vbLf)



no = Int32.Parse(Console.ReadLine())


n = no


While n > 0


r = n Mod 10


n = n \ 10


sum += r * r * r


End While



If sum = no Then


Console.WriteLine("{0} is a Amstrong number", no)


Else


Console.WriteLine("{0} is not a Amstrong number", no)


End If


Console.ReadLine()

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How do you get a timer to work in a loop to slow it down in vb6?

You can use the Sleep function in VB6 to introduce a delay within your loop. This function pauses the execution for a specified number of milliseconds. Just insert Sleep(milliseconds) in your loop to slow it down.


How do you get square root in Microsoft visual basic?

The function is Sqr() in VB6 and Math.Sqr() in .NET.


Solving transportation problem in Visual basic programming?

hi every body my name is mohamed i live in egypt i am a programer with vb6 i ca solve the transport problem using vb6 just keep in touch with me at my phone number 002 0106909294 thnks


What is difference between vb5 vb6?

VB6 is a more recent and more advanced version of visual basic.


How do you convert vb6 to dmg?

A .vb6 file is visual basic 6 source code, sometimes with it are .frm files that you would need. A .dmg is a Macintosh binary. you would have to find a program to compile the vb6 code to a Macintosh binary.


'Download Visual Studio 6 Or Visual Basic 6 In Free?

Studio consists of C#, VisualJ, etc. Visual Basic is the predefined function of the VB6 environment. if you want to code in VB strictly, download VB6, but if you want to use C#, etc. than use VS6. But by now, I recommend upgrading to VS2008


How can you execute a new line in VB6?

vbNewLine


Differences butween the vb6 asnd vbnet?

Please refer the following link, there you can find useful information about differences between VB6 and VB .NET


Free vb6 source code download for submission?

thanks


How do you make a cp trainer with free member?

use vb6


How can you make a vb6 project a web based project or how will you able to embed vb6 project or vb.net project into asp.net website?

you simply cant, unless you know how to upload exe's to the internet.


How can you print reports by vb6 using Crystal Report?

is : CrystalReport1.Reset CrystalReport1.ReportFileName="MyReport.rpt" CrystalReport1.Destination=(Printer) CrystalReport1.Action=6 CrystalReport1.DiscardSaveData=True