Click here to Skip to main content
15,915,702 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Question :
weighted Modulus 11 Formula

The format is
Weighted factors are 86423597
obtain sum of these numbers
divide by 11
if rem is 0 use 5 as the check digit.if remainder is 1 use 0 as the check digit

example:
Number 4 7 3 1 2 4 8 2
Weighting facotrs *8 *6 *4 *2 *3 *5 *9 *7
-------------------------
32+42+12+ 2+ 6+20+ 72+14=200

200:11 = 18 remainder 2
11-2 =9 checkdigit
complete self checking number:473124829

I need a c# code for this Method
Posted
Comments
[no name] 16-Apr-12 7:36am    
And the part you are stuck on?

1 solution

VB
Private ableToProgram As Boolean = False

Private Sub Button1_Click(ByVal sender As System.Object, _
                          ByVal e As System.EventArgs) _
                          Handles Button1.Click
    Dim grade As String
    Dim decision As String

    While Not ableToProgram
        decision = InputBox("Do you want to cheat? (Y/N)", _
                            "Learn to Program", "Y")
        If decision.ToUpper = "Y" Then
            grade = PostAssignmentOnForums()
        Else
            grade = DoWorkYourself()
        End If
        MsgBox(String.Format("You got an {0}", grade))
    End While

    MsgBox("Good Choice!")
End Sub

Function PostAssignmentOnForums() As String
    ableToProgram = False
    Return "F"
End Function

Function DoWorkYourself() As String
    ableToProgram = True
    Return "A"
End Function



How to complete your programming homework assignment[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900