(a) (15%) Write a C# program that computes and prints out all prime numbers <200. Print these prime numbers 8 in a row.

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

(a) (15%) Write a C# program that computes and prints out all prime numbers <200. Print these prime numbers 8 in a row.

Post by answerhappygod »

A 15 Write A C Program That Computes And Prints Out All Prime Numbers 200 Print These Prime Numbers 8 In A Row 1
A 15 Write A C Program That Computes And Prints Out All Prime Numbers 200 Print These Prime Numbers 8 In A Row 1 (28.74 KiB) Viewed 25 times
(a) (15%) Write a C# program that computes and prints out all prime numbers <200. Print these prime numbers 8 in a row. A prime number is a positive integer> 1 with 1 and itself as the only two divisors. So, 2, 3, 5, 7, 11, 13, 17, 19 are the first 8 prime integers. To compute prime numbers, you may use the % (modulo) operator. (b) (10%) Enhance your C# program to compute the total number of prime number less than 1000. You do not have to print out the prime numbers 8 in a row; just how many they are. To clarify this question, if I ask you to compute and print prime numbers less than 100, you'll print 2 3 5 7 11 13 17 19 in the first row, 23 29 31 37 41 43 47 53 in the second row etc; but if I ask you to compute the total number of prime numbers less than 100, then the total is 25 since there are 25 prime numbers from 2,3 up to 89, 97, less than 100
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply