C Positive Integer M Called Composite M Ab B Positive Integers 1 B 1 M Composite M Written Q37267971

C++

A positive integer m is called composite if m = ab, where a andb are positive integers such that a ≠ 1 and b ≠ 1. If m iscomposite, then m can be written as a product of prime numbers. Letm be an integer such that 2 ≤ m ≤ 100,000,000. Modify the programin Exercise 21 so that if m is not prime, the program outputs m asa product of prime numbers. Code from Exercise 21 has been includedfor you:

#include <iostream>
#include <cmath>

using namespace std;

const int SIZE = 1230;

bool isPrime(int number);
void first1230PrimeNum(int list[], int length);
void primeTest(int num, int list[], int length);

int

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.