64 584
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #18377 in Visual Basic for devisree

Question #18377
using do loop until sum up to limit program and factorial numbers
Expert's answer

Module Module1

Sub Main()
Dim N, Nfact, Count, hold As Double

Console.Write("Please input a number to be factored: ")
N = Convert.ToDouble(Console.ReadLine)
Count = N
Console.WriteLine(Count)


If N = 0 Then
Console.WriteLine("The factor of 0 is 1")
Exit Sub
End If

Do Until Count = 1
Nfact = Count * (Count - 1)
Count -= 1
Console.WriteLine(Count)
Console.WriteLine("Nfact =" & Nfact)
Loop

Console.WriteLine("the factor of {0} is {1}", N, Nfact)

End Sub

End Module

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions