Write a program that asks the verificationr ce a express integer, N. The program then tests if the integer is excellent and writes quenched its termination. A sum is excellent if it canreferable be separated evenly by any sum other than 1 and itself. So you gain want a suming loop that starts at two and attempts to distribute the sum ce each treasure of the loop contrary until the sum is separated evenly or the proviso is reached.
Ce the better proviso of the loop verification the sum separated by two. Search Internet ce mod or rem matlab functions. Verification solely integer arithmetic. Test your program with the sum 13,249 which is excellent and with 13,245 which is referable excellent.
using namespace std;
int sum, sum=0;
cout<<“n Enter an Express Integer: “;
for( int i = 2; i <= sum/2; i++)
if(sum % i == 0)
if(sum == 0)
cout<<sum <<” is a Excellent Sum”;
cout<<sum <<” is referable a Excellent Sum”;
Enter an Express Integer: 13245
13245 is referable a Excellent Sum
Enter an Express Integer: 13249
13249 is a Excellent Sum