Visual Basic

posted by .

what does IntTemp and IntRem mean? and whats wrong with my code, i don't know whats wrong with it...
Code below:

Dim intNum As Integer 'the numderator is read as a whole number.
Dim intDenom As Integer 'the denominator is read as a whole number.
Dim inttemp As Integer
Dim intrem As Integer
Private Sub bntReduce_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntReduce.Click

intNum = Val(txtinputA.Text) 'the Val statement is, if there is a letter placed into the text box, the code wont break,
intDenom = Val(txtinputB.Text) 'the Val statement is, if there is a letter placed into the text box, the code wont break,

MessageBox.Show("Fraction can not be reduced", MsgBoxStyle.YesNo) 'when someone types in a two numbers, and the numbers can not be reduced this message box shows up saying that the numbers can reduce, and to try again.

Call Reduce(intNum, intDenom) 'this is used to call the public sub below.

lbloutput.Text = inttemp

End Sub

Public Sub Reduce(ByVal intnum As Integer, ByVal intDenom As Integer)

intrem = intnum

inttemp = intDenom

intnum = inttemp

Loop While intDenom <> 0

intrem = intnum

End Sub

End Class

  • Visual Basic -

    if u didn't figure have to reduce the fraction

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. visual basic

    Cant get my message dialog box to display anbody see waht wrong with it?
  2. visual basic

    here is my source code for my program im trying to convert 10 units from furlong to meters the answer is supposed to be 2011.68 meters i keep getting 2000. I know if i cant get this right the rest of the conversion will give the wrong …
  3. programming

    I am supposed to modify this program so it begins by asking the user for the number of values. The program then uses a loop to read the specified number of values and then display their average. program is below that i worked on in …
  4. visual basic

    Im trying to get this program to average three number having a problem the sample nmubers im using are 6 6 2 average supposed to be 4.6667 but im just geting .6667 I think it has something to do with my s=value(i) not sure what i need …
  5. Computer programming

    The code below is supposed to calculate the average for a student using 10 grades. It contains several errors. Rewrite the code using the correct naming conventions and turn in the full solution and discuss using this topic. Dim arrGrades(10) …
  6. Programming

    Write a program that allows the user to display a budget as a pie chart. After the user enters numbers into the four text boxes a presses the button, the pie chart should be displayed. When I push the button for my code it does not …
  7. Visual Basic

    Alright, so I'm trying to code a program to where I can plug in two numbers and get a commission cost out of them. I'm having a hard time setting up the code, and I'm really looking for some guidance. I have this as the code so far: …
  8. Programming (Visual Basic)

    Im seem to be having trouble with this Exercise. Would you mind helping me please?
  9. comptuer programming

    i need help with my code i keep comin up with errors in basic Dim Firstname as string Dim Lastname as string Dim Empnum As Integer Dim HourRate As Integer Dim Hours As Integer Dim Tools As Integer Dim Total As Integer Dim Netpay As …
  10. Visual Basic

    how to use formula b=p (1+r)^n, to calculate annual interests for a savings account in visual basic project This is my code so far>>>>>>>>>>>>>> Option Explicit On Option Strict On Option Infer …

More Similar Questions