Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ PROGRAMMING: PLEASE MAKE SURE THE PROGRAM COMPILES AND RUNS FOR 5 STARS :-) For this assignment youll be creating several programs (or, if youre

C++ PROGRAMMING: PLEASE MAKE SURE THE PROGRAM COMPILES AND RUNS FOR 5 STARS :-)

For this assignment youll be creating several programs (or, if youre so inclined, one program with multiple functionality) to deal with the purpose of finding primes, co-primes, gcds, and lcms. Your program(s) will need to do the following:

1.) Given a single number, use the Sieve of Eratosthenes to print out all prime numbers between one and the given number, if the given number itself is also prime.

2.) Given two numbers, use Euclids Algorithm to compute both the Greatest Common Divisor and the Least Common Multiple for the two numbers.

3.) Given three numbers, determine if the given numbers are relatively prime, meaning that the three of them together only share a GCD of 1. If theyre relatively prime, have your program say so, and if theyre not, print out what their common GCD is.

Feed your program(s) the following numbers, and give screenshots of the results:

1.) 77

2.) 458

3.) 1447

4.) 294 & 966

5.) 367 & 409

6.) 728 & 2408

7.) 14, 49, & 342

8.) 119, 629, & 1411

9.) 42, 1337, & 1030301

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions

Question

305 mg of C6H12O6 in 55.2 mL of solution whats the molarity

Answered: 1 week ago

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago