Answer:
// A optimized school method based C++ program to check
// if a number is composite.
#include <bits/stdc++.h>
using namespace std;
bool isComposite(int n)
// Driver Program to test above function
int main()
{
isComposite(11)? cout << " true\\": cout << " false\\";
isComposite(15)? cout << " true\\": cout << " false\\";
return 0;
}
Step-by-step explanation: