Question
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
Do
inttemp = intDenom
intnum = inttemp
Loop While intDenom <> 0
intrem = intnum
End Sub
End Class
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
Do
inttemp = intDenom
intnum = inttemp
Loop While intDenom <> 0
intrem = intnum
End Sub
End Class
Answers
if u didn't figure out...you have to reduce the fraction
Related Questions
in an experiment a sample of hydrocarbon was analyzed. The sample contained6 g of carbon and 1.344 g...
Can you please tell me whats right and whats wrong..Thank you.
Part I: True or False
1. The foll...
Given: an=14(12)n−1
match the term to its answer. Answers may be used more than once.(4 points)...
Como se llama?
Option:
O whats his/her name? O whats your name? O who is he/she? O whats up?