Do While/Loop (Visual Basic) (1 Viewer)

LYLEY19

Registered User.
Local time
Today, 14:21
Joined
Sep 21, 2012
Messages
16
I think it's not * 2. If it was, then how is 3 equal to 1/4? And 5 is to 1/16?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 14:21
Joined
Aug 30, 2003
Messages
36,124
The denominator is. If it's 5:

first loop is always 1 (1/1)
1 times 2 is 2 (1/2)
2 times 2 is 4 (1/4)
4 times 2 is 8 (1/8)
8 times 2 is 16 (1/16)
 

LYLEY19

Registered User.
Local time
Today, 14:21
Joined
Sep 21, 2012
Messages
16
How do i make it a fraction? Alright I'm kinda lost again
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 14:21
Joined
Aug 30, 2003
Messages
36,124
Numerator & "/" & Denominator
 

LYLEY19

Registered User.
Local time
Today, 14:21
Joined
Sep 21, 2012
Messages
16
Can you site an example of how the code looks like with do while/loop? Even just the beginning itself would really be a big help for me
 

LYLEY19

Registered User.
Local time
Today, 14:21
Joined
Sep 21, 2012
Messages
16

Attachments

  • Capture.PNG
    Capture.PNG
    24.9 KB · Views: 184

pbaldy

Wino Moderator
Staff member
Local time
Today, 14:21
Joined
Aug 30, 2003
Messages
36,124
You could do it the same way you were before. That looped once for each integer, did it not?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 14:21
Joined
Aug 30, 2003
Messages
36,124
Use a different variable. You can't put s string value into an Integer variable.
 

Users who are viewing this thread

Top Bottom