Algorithms & FLowcharts
Thursday, October 10, 2013
Algorithm to print all the integers between 1 and N which are evenly divisible by 6 and 7
STEP 1.
I <-- 1, N <-- 0
STEP 2.
Read N
STEP 3.
While (I <= N) do Steps 4 and 5
STEP 4.
Is (I mod 6 = 0 AND I mod 7 = 0)
Then
Begin
Print I
End
STEP 5.
I <-- I + 1
1 comment:
Unknown
October 17, 2018 at 1:42 AM
NYC algorithm
Reply
Delete
Replies
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
NYC algorithm
ReplyDelete