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()
Create a textbox a label and a button
paste the code on button click.
Dim i, a, b, c, sum As Integer 'Declare variable i,a,b,c,and sum
Label1.ForeColor = &HC000& 'Change the font color of the ouput label
i = Val(Text1.Text) 'Assign text1 value to i
a = i \ 100 'Divide the i value by 100 and take the real part
b = (i Mod 100) \ 10 'Use mod to remove the first number and divide by 10-> take the real part
c = i Mod 10 'Take the last number by use mod.
sum = a * a * a + b * b * b + c * c * c
'START CHECKING
If sum = i Then 'Checks if sum equals to i value
Label1.Caption = i & " is an Armstrong number"
Else
Label1.ForeColor = vbRed 'Change the font color of the ouput label to red!
Label1.Caption = i & " is not an Armstrong number"
End If
rusputin
Dim i, a, b, c, sum As Integer 'Declare variable i,a,b,c,and sum
Label1.ForeColor = &HC000& 'Change the font color of the ouput label
i = Val(Text1.Text) 'Assign text1 value to i
a = i \ 100 'Divide the i value by 100 and take the real part
b = (i Mod 100) \ 10 'Use mod to remove the first number and divide by 10-> take the real part
c = i Mod 10 'Take the last number by use mod.
Sum = a * a * a + b * b * b + c * c * c
'START CHECKING
If sum = i Then 'Checks if sum equals to i value
Label1.Caption = i & " is an armstrong number"
Else
Label1.ForeColor = vbRed 'Change the font color of the ouput label to red!
Label1.Caption = i & " is not an armstrong number"
End If
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
thanks
imgscan.SetScanCapability 100, 1 ' Noir et blanc
It isn't, except for the (Name) property! It is just that the default for vb6 is ShockwaveFlash.
don't save your work. restart your pc. and it will gone. ENJOY :)
The function is Sqr() in VB6 and Math.Sqr() in .NET.
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
VB6 is a more recent and more advanced version of visual basic.
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.
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
vbNewLine
Please refer the following link, there you can find useful information about differences between VB6 and VB .NET
use vb6
thanks
you simply cant, unless you know how to upload exe's to the internet.
is : CrystalReport1.Reset CrystalReport1.ReportFileName="MyReport.rpt" CrystalReport1.Destination=(Printer) CrystalReport1.Action=6 CrystalReport1.DiscardSaveData=True
imgscan.SetScanCapability 100, 1 ' Noir et blanc