- 0
For loop
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
What will be the assembly language code of this pseudo code?
By ifarhanrifat,
- 0 answers
- 4,073 views
-
- 7 answers
- 7,473 views
-
- 6 answers
- 4,173 views
-
- 1 answer
- 39,035 views
-
- 10 answers
- 5,634 views
-
Question
bs819
I should have just added this in my topic yesterday :P
I'm trying create a for loop that calculates a series of fractions, ranging from 1/30 to 30/1.
So far I have that I need to increment the numerator counter and decrement the denominator counter. I'm just confused about how to write the code that adds the fractions together!
Does this look right at all? This is my first programming class so it's still confusing to me!
For num = 1 To 30 Step 1
For den = 30 To 1 Step -1
Set sum = sum + (num/den)
(Once again, I'm not learning a specific language at the moment, so I'm sorry if it seems so basic haha)
Link to comment
https://www.neowin.net/forum/topic/1177431-for-loop/Share on other sites
4 answers to this question
Recommended Posts