2.10 Nested Loopi outer loop count 2 prime ← "yes" while count

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

2.10 Nested Loopi outer loop count 2 prime ← "yes" while count

Post by answerhappygod »

2 10 Nested Loopi Outer Loop Count 2 Prime Yes While Count X And Prime Equals Yes Inner Loop If X Count Has No 1
2 10 Nested Loopi Outer Loop Count 2 Prime Yes While Count X And Prime Equals Yes Inner Loop If X Count Has No 1 (52.85 KiB) Viewed 19 times
2.10 Nested Loopi outer loop count 2 prime ← "yes" while count <x and prime equals "yes" { inner loop if x/count has no remainder prime ← "no" else count count + 1 if prime equals "yes" and x > largest Prime largest Prime ← x print "Enter a number (negative to quit): " input x } if largest Prime equals 1 print "No prime numbers were entered." else print "The largest prime number entered was " + largest Prime + "" Figure 2.13 Algorithm that finds the largest prime number from a user-entered list of numbers largest Prime ← 1 print "Enter a number (negative to quit): input x while x ≥ 0 {
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply