SlideShare a Scribd company logo
#include
using namespace std;
int IsSemifauxtrifactored(int value)
{
// Return 1 if a number's factors/divisors from (value - 1) to 1
sum up to a quarter of the number value
// Return 0 otherwise
// A number is called "semifauxtrifactored" if its summed
factors/divisors equal a quarter of the number itself
// Integer division is used, so remainders on the halving can
be lost
// That's why...
// 7 is a semifauxtrifactored number
// 7 divided by 4 with integer division is (7 / 4) = 1
// 7 % 6 -> 1
// 7 % 5 -> 2
// 7 % 4 -> 3
// 7 % 3 -> 1
// 7 % 2 -> 1
// 7 % 1 -> 0 FACTOR!
// 7 is a semifauxtrifactored number since its factors (1)
equal a quarter of the number (1)
// 6 is a normal number
// 6 divided by 4 with integer division is (6 / 4) = 1
// 6 % 5 -> 1
// 6 % 4 -> 2
// 6 % 3 -> 0 FACTOR!
// 6 % 2 -> 0 FACTOR!
// 6 % 1 -> 0 FACTOR!
// 6 is a normal number since its factors (1 + 2 + 3) do not
equal a quarter of the number (1)
}
int main()
{
cout << "Enter a value: ";
int value;
cin >> value;
value = IsSemifauxtrifactored(value);
if (value == 1)
{
cout << "The number is semifauxtrifactored!";
}
else
{
cout << "The number is normal";
}
cout << endl;
system("PAUSE");
}

More Related Content

More from poulterbarbara

0091-4169049501-0001THE JOURNAL OF CRIMINAL LAW & CRIMINOL.docx
0091-4169049501-0001THE JOURNAL OF CRIMINAL LAW & CRIMINOL.docx0091-4169049501-0001THE JOURNAL OF CRIMINAL LAW & CRIMINOL.docx
0091-4169049501-0001THE JOURNAL OF CRIMINAL LAW & CRIMINOL.docx
poulterbarbara
 
.,Discuss power, authority, and violenceDifferentiate between .docx
.,Discuss power, authority, and violenceDifferentiate between .docx.,Discuss power, authority, and violenceDifferentiate between .docx
.,Discuss power, authority, and violenceDifferentiate between .docx
poulterbarbara
 
. Why is understanding the fundamentals of persuasion and argume.docx
. Why is understanding the fundamentals of persuasion and argume.docx. Why is understanding the fundamentals of persuasion and argume.docx
. Why is understanding the fundamentals of persuasion and argume.docx
poulterbarbara
 
09-15 PRACTICAL EXERCISE PE 4-04-1 TITL.docx
09-15 PRACTICAL EXERCISE PE 4-04-1             TITL.docx09-15 PRACTICAL EXERCISE PE 4-04-1             TITL.docx
09-15 PRACTICAL EXERCISE PE 4-04-1 TITL.docx
poulterbarbara
 
0Running Head NON-VERBAL COMMUNICATIONS 10NON-VERBAL C.docx
0Running Head NON-VERBAL COMMUNICATIONS 10NON-VERBAL C.docx0Running Head NON-VERBAL COMMUNICATIONS 10NON-VERBAL C.docx
0Running Head NON-VERBAL COMMUNICATIONS 10NON-VERBAL C.docx
poulterbarbara
 
... all men are created equal ... they are endowed by their Cre.docx
... all men are created equal ... they are endowed by their Cre.docx... all men are created equal ... they are endowed by their Cre.docx
... all men are created equal ... they are endowed by their Cre.docx
poulterbarbara
 
-Extended definition of AI and contextual overview.-Detailed d.docx
-Extended definition of AI and contextual overview.-Detailed d.docx-Extended definition of AI and contextual overview.-Detailed d.docx
-Extended definition of AI and contextual overview.-Detailed d.docx
poulterbarbara
 
1 CDU APA 6th Referencing Style Guide (Febru.docx
1  CDU APA 6th  Referencing Style Guide (Febru.docx1  CDU APA 6th  Referencing Style Guide (Febru.docx
1 CDU APA 6th Referencing Style Guide (Febru.docx
poulterbarbara
 
1 How to Overcome Public Perception Issues on Potable R.docx
1  How to Overcome Public Perception Issues on Potable R.docx1  How to Overcome Public Perception Issues on Potable R.docx
1 How to Overcome Public Perception Issues on Potable R.docx
poulterbarbara
 
. Thoroughly complete each part of the prewriting process.. .docx
. Thoroughly complete each part of the prewriting process.. .docx. Thoroughly complete each part of the prewriting process.. .docx
. Thoroughly complete each part of the prewriting process.. .docx
poulterbarbara
 
. Research Paper Give a behaviorists response to the charge t.docx
. Research Paper Give a behaviorists response to the charge t.docx. Research Paper Give a behaviorists response to the charge t.docx
. Research Paper Give a behaviorists response to the charge t.docx
poulterbarbara
 
-QuestionsDiscuss how Adam vision was formedHow did he deve.docx
-QuestionsDiscuss how Adam vision was formedHow did he deve.docx-QuestionsDiscuss how Adam vision was formedHow did he deve.docx
-QuestionsDiscuss how Adam vision was formedHow did he deve.docx
poulterbarbara
 
-100 Original Work.Graduate Level Writing Required..docx
-100 Original Work.Graduate Level Writing Required..docx-100 Original Work.Graduate Level Writing Required..docx
-100 Original Work.Graduate Level Writing Required..docx
poulterbarbara
 
- Teaching middle school football players and their parents about li.docx
- Teaching middle school football players and their parents about li.docx- Teaching middle school football players and their parents about li.docx
- Teaching middle school football players and their parents about li.docx
poulterbarbara
 
- Open attached file name journals for details and instructions.docx
- Open attached file name journals for details and instructions.docx- Open attached file name journals for details and instructions.docx
- Open attached file name journals for details and instructions.docx
poulterbarbara
 
- Instructions are included on the the research paper titled Histor.docx
- Instructions are included on the the research paper titled Histor.docx- Instructions are included on the the research paper titled Histor.docx
- Instructions are included on the the research paper titled Histor.docx
poulterbarbara
 
- What made some regions and some workers more exposed to Chinese im.docx
- What made some regions and some workers more exposed to Chinese im.docx- What made some regions and some workers more exposed to Chinese im.docx
- What made some regions and some workers more exposed to Chinese im.docx
poulterbarbara
 
) Why does Fussell thank God for the atom bomb What role does his.docx
) Why does Fussell thank God for the atom bomb What role does his.docx) Why does Fussell thank God for the atom bomb What role does his.docx
) Why does Fussell thank God for the atom bomb What role does his.docx
poulterbarbara
 
- Powerpoint presentation must be 10 minutes long so accordingly att.docx
- Powerpoint presentation must be 10 minutes long so accordingly att.docx- Powerpoint presentation must be 10 minutes long so accordingly att.docx
- Powerpoint presentation must be 10 minutes long so accordingly att.docx
poulterbarbara
 
- 1.5 pages double space-  should provide an overview of the aut.docx
- 1.5 pages double space-  should provide an overview of the aut.docx- 1.5 pages double space-  should provide an overview of the aut.docx
- 1.5 pages double space-  should provide an overview of the aut.docx
poulterbarbara
 

More from poulterbarbara (20)

0091-4169049501-0001THE JOURNAL OF CRIMINAL LAW & CRIMINOL.docx
0091-4169049501-0001THE JOURNAL OF CRIMINAL LAW & CRIMINOL.docx0091-4169049501-0001THE JOURNAL OF CRIMINAL LAW & CRIMINOL.docx
0091-4169049501-0001THE JOURNAL OF CRIMINAL LAW & CRIMINOL.docx
 
.,Discuss power, authority, and violenceDifferentiate between .docx
.,Discuss power, authority, and violenceDifferentiate between .docx.,Discuss power, authority, and violenceDifferentiate between .docx
.,Discuss power, authority, and violenceDifferentiate between .docx
 
. Why is understanding the fundamentals of persuasion and argume.docx
. Why is understanding the fundamentals of persuasion and argume.docx. Why is understanding the fundamentals of persuasion and argume.docx
. Why is understanding the fundamentals of persuasion and argume.docx
 
09-15 PRACTICAL EXERCISE PE 4-04-1 TITL.docx
09-15 PRACTICAL EXERCISE PE 4-04-1             TITL.docx09-15 PRACTICAL EXERCISE PE 4-04-1             TITL.docx
09-15 PRACTICAL EXERCISE PE 4-04-1 TITL.docx
 
0Running Head NON-VERBAL COMMUNICATIONS 10NON-VERBAL C.docx
0Running Head NON-VERBAL COMMUNICATIONS 10NON-VERBAL C.docx0Running Head NON-VERBAL COMMUNICATIONS 10NON-VERBAL C.docx
0Running Head NON-VERBAL COMMUNICATIONS 10NON-VERBAL C.docx
 
... all men are created equal ... they are endowed by their Cre.docx
... all men are created equal ... they are endowed by their Cre.docx... all men are created equal ... they are endowed by their Cre.docx
... all men are created equal ... they are endowed by their Cre.docx
 
-Extended definition of AI and contextual overview.-Detailed d.docx
-Extended definition of AI and contextual overview.-Detailed d.docx-Extended definition of AI and contextual overview.-Detailed d.docx
-Extended definition of AI and contextual overview.-Detailed d.docx
 
1 CDU APA 6th Referencing Style Guide (Febru.docx
1  CDU APA 6th  Referencing Style Guide (Febru.docx1  CDU APA 6th  Referencing Style Guide (Febru.docx
1 CDU APA 6th Referencing Style Guide (Febru.docx
 
1 How to Overcome Public Perception Issues on Potable R.docx
1  How to Overcome Public Perception Issues on Potable R.docx1  How to Overcome Public Perception Issues on Potable R.docx
1 How to Overcome Public Perception Issues on Potable R.docx
 
. Thoroughly complete each part of the prewriting process.. .docx
. Thoroughly complete each part of the prewriting process.. .docx. Thoroughly complete each part of the prewriting process.. .docx
. Thoroughly complete each part of the prewriting process.. .docx
 
. Research Paper Give a behaviorists response to the charge t.docx
. Research Paper Give a behaviorists response to the charge t.docx. Research Paper Give a behaviorists response to the charge t.docx
. Research Paper Give a behaviorists response to the charge t.docx
 
-QuestionsDiscuss how Adam vision was formedHow did he deve.docx
-QuestionsDiscuss how Adam vision was formedHow did he deve.docx-QuestionsDiscuss how Adam vision was formedHow did he deve.docx
-QuestionsDiscuss how Adam vision was formedHow did he deve.docx
 
-100 Original Work.Graduate Level Writing Required..docx
-100 Original Work.Graduate Level Writing Required..docx-100 Original Work.Graduate Level Writing Required..docx
-100 Original Work.Graduate Level Writing Required..docx
 
- Teaching middle school football players and their parents about li.docx
- Teaching middle school football players and their parents about li.docx- Teaching middle school football players and their parents about li.docx
- Teaching middle school football players and their parents about li.docx
 
- Open attached file name journals for details and instructions.docx
- Open attached file name journals for details and instructions.docx- Open attached file name journals for details and instructions.docx
- Open attached file name journals for details and instructions.docx
 
- Instructions are included on the the research paper titled Histor.docx
- Instructions are included on the the research paper titled Histor.docx- Instructions are included on the the research paper titled Histor.docx
- Instructions are included on the the research paper titled Histor.docx
 
- What made some regions and some workers more exposed to Chinese im.docx
- What made some regions and some workers more exposed to Chinese im.docx- What made some regions and some workers more exposed to Chinese im.docx
- What made some regions and some workers more exposed to Chinese im.docx
 
) Why does Fussell thank God for the atom bomb What role does his.docx
) Why does Fussell thank God for the atom bomb What role does his.docx) Why does Fussell thank God for the atom bomb What role does his.docx
) Why does Fussell thank God for the atom bomb What role does his.docx
 
- Powerpoint presentation must be 10 minutes long so accordingly att.docx
- Powerpoint presentation must be 10 minutes long so accordingly att.docx- Powerpoint presentation must be 10 minutes long so accordingly att.docx
- Powerpoint presentation must be 10 minutes long so accordingly att.docx
 
- 1.5 pages double space-  should provide an overview of the aut.docx
- 1.5 pages double space-  should provide an overview of the aut.docx- 1.5 pages double space-  should provide an overview of the aut.docx
- 1.5 pages double space-  should provide an overview of the aut.docx
 

Recently uploaded

ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 

Recently uploaded (20)

ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 

#include using namespace std;int IsSemifauxtrifactored.docx

  • 1. #include using namespace std; int IsSemifauxtrifactored(int value) { // Return 1 if a number's factors/divisors from (value - 1) to 1 sum up to a quarter of the number value // Return 0 otherwise // A number is called "semifauxtrifactored" if its summed factors/divisors equal a quarter of the number itself // Integer division is used, so remainders on the halving can be lost // That's why... // 7 is a semifauxtrifactored number // 7 divided by 4 with integer division is (7 / 4) = 1 // 7 % 6 -> 1 // 7 % 5 -> 2 // 7 % 4 -> 3
  • 2. // 7 % 3 -> 1 // 7 % 2 -> 1 // 7 % 1 -> 0 FACTOR! // 7 is a semifauxtrifactored number since its factors (1) equal a quarter of the number (1) // 6 is a normal number // 6 divided by 4 with integer division is (6 / 4) = 1 // 6 % 5 -> 1 // 6 % 4 -> 2 // 6 % 3 -> 0 FACTOR! // 6 % 2 -> 0 FACTOR! // 6 % 1 -> 0 FACTOR! // 6 is a normal number since its factors (1 + 2 + 3) do not equal a quarter of the number (1) } int main() { cout << "Enter a value: ";
  • 3. int value; cin >> value; value = IsSemifauxtrifactored(value); if (value == 1) { cout << "The number is semifauxtrifactored!"; } else { cout << "The number is normal"; } cout << endl; system("PAUSE"); }