
April 17th, 2005, 10:24 PM
|
|
Registered User
|
|
Join Date: Mar 2005
Location: Hawaii
Posts: 12
Time spent in forums: 12 h 2 m 52 sec
Reputation Power: 0
|
|
Help on Loops
Hi everyone 
I need to write a code using two loops and I need to write a flowchart for that code before doing that but I have a problem. I figured out how to write the flowchart for the second loop but I am confused at how to write the first loop.
It says for the first loop:
1. Count the number of even postive integers that are <= N.
2. Write this count.
Example:
1) If N=4, the number of even positive integers <= 4 is 2. (where the 2 positive integers are 2 and 4)
2) If N=3, the number of even positive integers <=3 is 1. (where the 1 positive integer is 2)
Can anyone help me?  I tried it out many times but it doesn't seem to come out. Thank you.
|