SlideShare a Scribd company logo
Create the Function for the program that will prompt the user to enter a valid # 1-20. Protect
against #s too large or small and return only valid #s within range
#include<iostream>
#include<windows.h>
int pd(std::string); // prototype
using namespace std;
int main()
{
int s1{ 0 };
int s2{ 1 };
int s3{ 2 };
s1 = pd("nntEnter s1 "); // call
cout << "nns1 = " << s1;// call
s2 = pd("nntEnter s2 ");
cout << "nns2 = " << s2;
s3 = pd("nntEnter s3 ");
cout << "nns3 = " << s3;
cout << endl;
return 0;
}
// Create a Function and type it here. Use a loop for valid range (no goto)
c++
Create the Function for the program that will prompt the user to enter.pdf
Ad

More Related Content

More from shyamsunder1211 (20)

Current Attempt in Progress Here is financial information for Sunland.pdf
Current Attempt in Progress Here is financial information for Sunland.pdfCurrent Attempt in Progress Here is financial information for Sunland.pdf
Current Attempt in Progress Here is financial information for Sunland.pdf
shyamsunder1211
 
Current Attempt in Progress Below is a partial listing of the adjusted.pdf
Current Attempt in Progress Below is a partial listing of the adjusted.pdfCurrent Attempt in Progress Below is a partial listing of the adjusted.pdf
Current Attempt in Progress Below is a partial listing of the adjusted.pdf
shyamsunder1211
 
Current assets Current assets - contra Current liabilities Current lia.pdf
Current assets Current assets - contra Current liabilities Current lia.pdfCurrent assets Current assets - contra Current liabilities Current lia.pdf
Current assets Current assets - contra Current liabilities Current lia.pdf
shyamsunder1211
 
Cuck Ai That Appir first noter- fecernd mater mecanil tein- Bret tarie.pdf
Cuck Ai That Appir first noter- fecernd mater mecanil tein- Bret tarie.pdfCuck Ai That Appir first noter- fecernd mater mecanil tein- Bret tarie.pdf
Cuck Ai That Appir first noter- fecernd mater mecanil tein- Bret tarie.pdf
shyamsunder1211
 
Cross-sectional surveys can be characterized as- occurring at two po.pdf
Cross-sectional surveys can be characterized as-   occurring at two po.pdfCross-sectional surveys can be characterized as-   occurring at two po.pdf
Cross-sectional surveys can be characterized as- occurring at two po.pdf
shyamsunder1211
 
Criminal convictions and judgments are two components of your personal.pdf
Criminal convictions and judgments are two components of your personal.pdfCriminal convictions and judgments are two components of your personal.pdf
Criminal convictions and judgments are two components of your personal.pdf
shyamsunder1211
 
creatively and demonstrates his genuine care for their well-being on a.pdf
creatively and demonstrates his genuine care for their well-being on a.pdfcreatively and demonstrates his genuine care for their well-being on a.pdf
creatively and demonstrates his genuine care for their well-being on a.pdf
shyamsunder1211
 
Create C# Console Program The labels that stay are the only cursor tha.pdf
Create C# Console Program The labels that stay are the only cursor tha.pdfCreate C# Console Program The labels that stay are the only cursor tha.pdf
Create C# Console Program The labels that stay are the only cursor tha.pdf
shyamsunder1211
 
Create this program in visual studio C# The design of the form A text.pdf
Create this program in visual studio C# The design of the form A text.pdfCreate this program in visual studio C# The design of the form A text.pdf
Create this program in visual studio C# The design of the form A text.pdf
shyamsunder1211
 
Create me an activity diagram for this scenario- A Call Taker receives.pdf
Create me an activity diagram for this scenario- A Call Taker receives.pdfCreate me an activity diagram for this scenario- A Call Taker receives.pdf
Create me an activity diagram for this scenario- A Call Taker receives.pdf
shyamsunder1211
 
Create some simple Python code which does the following- Creates a tup.pdf
Create some simple Python code which does the following- Creates a tup.pdfCreate some simple Python code which does the following- Creates a tup.pdf
Create some simple Python code which does the following- Creates a tup.pdf
shyamsunder1211
 
Create C# Console Program The labels just stay the cursor should move.pdf
Create C# Console  Program The labels just stay the cursor should move.pdfCreate C# Console  Program The labels just stay the cursor should move.pdf
Create C# Console Program The labels just stay the cursor should move.pdf
shyamsunder1211
 
Create an Eclipse Project called JavaProgram - Create a class called S.pdf
Create an Eclipse Project called JavaProgram - Create a class called S.pdfCreate an Eclipse Project called JavaProgram - Create a class called S.pdf
Create an Eclipse Project called JavaProgram - Create a class called S.pdf
shyamsunder1211
 
Create a program in MIPS assembly language that takes a string input a.pdf
Create a program in MIPS assembly language that takes a string input a.pdfCreate a program in MIPS assembly language that takes a string input a.pdf
Create a program in MIPS assembly language that takes a string input a.pdf
shyamsunder1211
 
Create an app called MyFinances- The app should allow the storing of f (1).pdf
Create an app called MyFinances- The app should allow the storing of f (1).pdfCreate an app called MyFinances- The app should allow the storing of f (1).pdf
Create an app called MyFinances- The app should allow the storing of f (1).pdf
shyamsunder1211
 
Create a system with GUI to support the food ordering process for a re.pdf
Create a system with GUI to support the food ordering process for a re.pdfCreate a system with GUI to support the food ordering process for a re.pdf
Create a system with GUI to support the food ordering process for a re.pdf
shyamsunder1211
 
Create a simple Node-js server (Save as w4_firstname_lastname-js) - Cr.pdf
Create a simple Node-js server (Save as w4_firstname_lastname-js) - Cr.pdfCreate a simple Node-js server (Save as w4_firstname_lastname-js) - Cr.pdf
Create a simple Node-js server (Save as w4_firstname_lastname-js) - Cr.pdf
shyamsunder1211
 
Create a scatterplot of the data- Chooce fiar oerect graph belew ident.pdf
Create a scatterplot of the data- Chooce fiar oerect graph belew ident.pdfCreate a scatterplot of the data- Chooce fiar oerect graph belew ident.pdf
Create a scatterplot of the data- Chooce fiar oerect graph belew ident.pdf
shyamsunder1211
 
create a risk register for catering business according to the given te.pdf
create a risk register for catering business according to the given te.pdfcreate a risk register for catering business according to the given te.pdf
create a risk register for catering business according to the given te.pdf
shyamsunder1211
 
Create a person-py file and write a person class that has the followin.pdf
Create a person-py file and write a person class that has the followin.pdfCreate a person-py file and write a person class that has the followin.pdf
Create a person-py file and write a person class that has the followin.pdf
shyamsunder1211
 
Current Attempt in Progress Here is financial information for Sunland.pdf
Current Attempt in Progress Here is financial information for Sunland.pdfCurrent Attempt in Progress Here is financial information for Sunland.pdf
Current Attempt in Progress Here is financial information for Sunland.pdf
shyamsunder1211
 
Current Attempt in Progress Below is a partial listing of the adjusted.pdf
Current Attempt in Progress Below is a partial listing of the adjusted.pdfCurrent Attempt in Progress Below is a partial listing of the adjusted.pdf
Current Attempt in Progress Below is a partial listing of the adjusted.pdf
shyamsunder1211
 
Current assets Current assets - contra Current liabilities Current lia.pdf
Current assets Current assets - contra Current liabilities Current lia.pdfCurrent assets Current assets - contra Current liabilities Current lia.pdf
Current assets Current assets - contra Current liabilities Current lia.pdf
shyamsunder1211
 
Cuck Ai That Appir first noter- fecernd mater mecanil tein- Bret tarie.pdf
Cuck Ai That Appir first noter- fecernd mater mecanil tein- Bret tarie.pdfCuck Ai That Appir first noter- fecernd mater mecanil tein- Bret tarie.pdf
Cuck Ai That Appir first noter- fecernd mater mecanil tein- Bret tarie.pdf
shyamsunder1211
 
Cross-sectional surveys can be characterized as- occurring at two po.pdf
Cross-sectional surveys can be characterized as-   occurring at two po.pdfCross-sectional surveys can be characterized as-   occurring at two po.pdf
Cross-sectional surveys can be characterized as- occurring at two po.pdf
shyamsunder1211
 
Criminal convictions and judgments are two components of your personal.pdf
Criminal convictions and judgments are two components of your personal.pdfCriminal convictions and judgments are two components of your personal.pdf
Criminal convictions and judgments are two components of your personal.pdf
shyamsunder1211
 
creatively and demonstrates his genuine care for their well-being on a.pdf
creatively and demonstrates his genuine care for their well-being on a.pdfcreatively and demonstrates his genuine care for their well-being on a.pdf
creatively and demonstrates his genuine care for their well-being on a.pdf
shyamsunder1211
 
Create C# Console Program The labels that stay are the only cursor tha.pdf
Create C# Console Program The labels that stay are the only cursor tha.pdfCreate C# Console Program The labels that stay are the only cursor tha.pdf
Create C# Console Program The labels that stay are the only cursor tha.pdf
shyamsunder1211
 
Create this program in visual studio C# The design of the form A text.pdf
Create this program in visual studio C# The design of the form A text.pdfCreate this program in visual studio C# The design of the form A text.pdf
Create this program in visual studio C# The design of the form A text.pdf
shyamsunder1211
 
Create me an activity diagram for this scenario- A Call Taker receives.pdf
Create me an activity diagram for this scenario- A Call Taker receives.pdfCreate me an activity diagram for this scenario- A Call Taker receives.pdf
Create me an activity diagram for this scenario- A Call Taker receives.pdf
shyamsunder1211
 
Create some simple Python code which does the following- Creates a tup.pdf
Create some simple Python code which does the following- Creates a tup.pdfCreate some simple Python code which does the following- Creates a tup.pdf
Create some simple Python code which does the following- Creates a tup.pdf
shyamsunder1211
 
Create C# Console Program The labels just stay the cursor should move.pdf
Create C# Console  Program The labels just stay the cursor should move.pdfCreate C# Console  Program The labels just stay the cursor should move.pdf
Create C# Console Program The labels just stay the cursor should move.pdf
shyamsunder1211
 
Create an Eclipse Project called JavaProgram - Create a class called S.pdf
Create an Eclipse Project called JavaProgram - Create a class called S.pdfCreate an Eclipse Project called JavaProgram - Create a class called S.pdf
Create an Eclipse Project called JavaProgram - Create a class called S.pdf
shyamsunder1211
 
Create a program in MIPS assembly language that takes a string input a.pdf
Create a program in MIPS assembly language that takes a string input a.pdfCreate a program in MIPS assembly language that takes a string input a.pdf
Create a program in MIPS assembly language that takes a string input a.pdf
shyamsunder1211
 
Create an app called MyFinances- The app should allow the storing of f (1).pdf
Create an app called MyFinances- The app should allow the storing of f (1).pdfCreate an app called MyFinances- The app should allow the storing of f (1).pdf
Create an app called MyFinances- The app should allow the storing of f (1).pdf
shyamsunder1211
 
Create a system with GUI to support the food ordering process for a re.pdf
Create a system with GUI to support the food ordering process for a re.pdfCreate a system with GUI to support the food ordering process for a re.pdf
Create a system with GUI to support the food ordering process for a re.pdf
shyamsunder1211
 
Create a simple Node-js server (Save as w4_firstname_lastname-js) - Cr.pdf
Create a simple Node-js server (Save as w4_firstname_lastname-js) - Cr.pdfCreate a simple Node-js server (Save as w4_firstname_lastname-js) - Cr.pdf
Create a simple Node-js server (Save as w4_firstname_lastname-js) - Cr.pdf
shyamsunder1211
 
Create a scatterplot of the data- Chooce fiar oerect graph belew ident.pdf
Create a scatterplot of the data- Chooce fiar oerect graph belew ident.pdfCreate a scatterplot of the data- Chooce fiar oerect graph belew ident.pdf
Create a scatterplot of the data- Chooce fiar oerect graph belew ident.pdf
shyamsunder1211
 
create a risk register for catering business according to the given te.pdf
create a risk register for catering business according to the given te.pdfcreate a risk register for catering business according to the given te.pdf
create a risk register for catering business according to the given te.pdf
shyamsunder1211
 
Create a person-py file and write a person class that has the followin.pdf
Create a person-py file and write a person class that has the followin.pdfCreate a person-py file and write a person class that has the followin.pdf
Create a person-py file and write a person class that has the followin.pdf
shyamsunder1211
 

Recently uploaded (20)

How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
libbys peer assesment.docx..............
libbys peer assesment.docx..............libbys peer assesment.docx..............
libbys peer assesment.docx..............
19lburrell
 
PUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for HealthPUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for Health
JonathanHallett4
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
COPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDFCOPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDF
SONU HEETSON
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFAMCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptxUnit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Mayuri Chavan
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
libbys peer assesment.docx..............
libbys peer assesment.docx..............libbys peer assesment.docx..............
libbys peer assesment.docx..............
19lburrell
 
PUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for HealthPUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for Health
JonathanHallett4
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
COPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDFCOPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDF
SONU HEETSON
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFAMCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptxUnit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Mayuri Chavan
 
Ad

Create the Function for the program that will prompt the user to enter.pdf

  • 1. Create the Function for the program that will prompt the user to enter a valid # 1-20. Protect against #s too large or small and return only valid #s within range #include<iostream> #include<windows.h> int pd(std::string); // prototype using namespace std; int main() { int s1{ 0 }; int s2{ 1 }; int s3{ 2 }; s1 = pd("nntEnter s1 "); // call cout << "nns1 = " << s1;// call s2 = pd("nntEnter s2 "); cout << "nns2 = " << s2; s3 = pd("nntEnter s3 "); cout << "nns3 = " << s3; cout << endl; return 0; } // Create a Function and type it here. Use a loop for valid range (no goto) c++
  翻译: