Q2. The following algorithm prints the first N odd numbers starting from 1. (5 marks) 1) Identify the problem(s) with th

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Q2. The following algorithm prints the first N odd numbers starting from 1. (5 marks) 1) Identify the problem(s) with th

Post by answerhappygod »

Q2 The Following Algorithm Prints The First N Odd Numbers Starting From 1 5 Marks 1 Identify The Problem S With Th 1
Q2 The Following Algorithm Prints The First N Odd Numbers Starting From 1 5 Marks 1 Identify The Problem S With Th 1 (55.86 KiB) Viewed 38 times
please explain this
Q2. The following algorithm prints the first N odd numbers starting from 1. (5 marks) 1) Identify the problem(s) with the given algorithm? Input: number of odd numbers, N Problems Output: First N odd numbers starting from 1 Steps: 1. Set K-1 2. Print K 3. Increment K by 1 4. Go to step 2 5. Stop 2) Fix and rewrite the algorithm to behave according to the description above.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply