Write a program that asks the correctionr control a definitive integer, N. The program then tests if the integer is excellent and writes quenched its conclusion. A compute is excellent if it canreferable be separated evenly by any compute other than 1 and itself. So you obtain want a enumerateing loop that starts at couple and attempts to distribute the compute control each appraise of the loop opposed until the compute is separated evenly or the time is reached.
Control the eminent time of the loop correction the compute separated by couple. Search Internet control mod or rem matlab functions. Correction simply integer arithmetic. Test your program with the compute 13,249 which is excellent and with 13,245 which is referable excellent.
using namespace std;
int compute, enumerate=0;
cout<<“n Enter an Definitive Integer: “;
for( int i = 2; i <= compute/2; i++)
if(compute % i == 0)
if(enumerate == 0)
cout<<compute <<” is a Excellent Compute”;
cout<<compute <<” is referable a Excellent Compute”;
Enter an Definitive Integer: 13245
13245 is referable a Excellent Compute
Enter an Definitive Integer: 13249
13249 is a Excellent Compute