-
Javascript to VB
Can somebody help me convert this to VB?
I need to multiply two numbers together without using *
- System.out.println("Enter the first number");
- BufferedReader obj =newBufferedReader(newInputStreamReader((System.in)));
- int a=Integer.parseInt(obj.readLine());
- System.out.println("Enter the Second number");
- int b=Integer.parseInt(obj.readLine());
- int c=0;
- for(int i=0;i<b;i++){
- c=c+a;
- }
- System.out.println("The Product is"+c);
- }
-
I believe I got it!
'Dim intinput1 As Integer
'Dim intinput2 As Integer
'Dim inttotal As Integer
'intinput1 = 10
'intinput2 = 4
'Dim intcount As Integer = 0
'Do Until intcount = intinput2
' intcount += 1
' inttotal = inttotal + intinput1
'Loop
'MessageBox.Show(inttotal)
-
-
Quote:
Originally Posted by
SamT
Total = Input1 * Input2
I had to solve this problem without using *. Although it was the first choice for me as well.
-
My bad, I totally missed the * in the requirements.
Glad you didn't :D