SlideShare a Scribd company logo
1 of 1
Download to read offline
C++ Write a function that takes a number as a parameter and displays it like this: *** ***
Data = # *** Create a program that uses this function along with the getNumber() function
from the previous example to prompt the user for a number and then display it.
Solution
main.cpp
#include
using namespace std;
// function declaration
int getNumber(int num);
int main () {
int n;
cout<<"Enter a number : ";
cin>>n;
cout<

More Related Content

More from formicreation

Description For this part of the assignment, you will create a Grid .pdf
Description For this part of the assignment, you will create a Grid .pdfDescription For this part of the assignment, you will create a Grid .pdf
Description For this part of the assignment, you will create a Grid .pdf
formicreation
 
Discuss one (1) traditional and two (2) new strategies that special i.pdf
Discuss one (1) traditional and two (2) new strategies that special i.pdfDiscuss one (1) traditional and two (2) new strategies that special i.pdf
Discuss one (1) traditional and two (2) new strategies that special i.pdf
formicreation
 
B. You do an experiment in which you divide 8 cell stage urch.pdf
B. You do an experiment in which you divide 8 cell stage urch.pdfB. You do an experiment in which you divide 8 cell stage urch.pdf
B. You do an experiment in which you divide 8 cell stage urch.pdf
formicreation
 
Any ideas on an IT topic I could use for this case studyFor this .pdf
Any ideas on an IT topic I could use for this case studyFor this .pdfAny ideas on an IT topic I could use for this case studyFor this .pdf
Any ideas on an IT topic I could use for this case studyFor this .pdf
formicreation
 
Assignment is Page 349-350 #4 and #5 Use the Linked Lis.pdf
Assignment is Page 349-350 #4 and #5 Use the Linked Lis.pdfAssignment is Page 349-350 #4 and #5 Use the Linked Lis.pdf
Assignment is Page 349-350 #4 and #5 Use the Linked Lis.pdf
formicreation
 
•From Chapter 1 of the textbook, President Wilson asserted that it i.pdf
•From Chapter 1 of the textbook, President Wilson asserted that it i.pdf•From Chapter 1 of the textbook, President Wilson asserted that it i.pdf
•From Chapter 1 of the textbook, President Wilson asserted that it i.pdf
formicreation
 
What quality measures does the MCO have in placeSolutionManag.pdf
What quality measures does the MCO have in placeSolutionManag.pdfWhat quality measures does the MCO have in placeSolutionManag.pdf
What quality measures does the MCO have in placeSolutionManag.pdf
formicreation
 
What are three benefits of diversity What are three challenges of d.pdf
What are three benefits of diversity What are three challenges of d.pdfWhat are three benefits of diversity What are three challenges of d.pdf
What are three benefits of diversity What are three challenges of d.pdf
formicreation
 
What role do birds play in the transmission of the West Nile virus W.pdf
What role do birds play in the transmission of the West Nile virus W.pdfWhat role do birds play in the transmission of the West Nile virus W.pdf
What role do birds play in the transmission of the West Nile virus W.pdf
formicreation
 
You just started a new job. The team you are working on is getting r.pdf
You just started a new job. The team you are working on is getting r.pdfYou just started a new job. The team you are working on is getting r.pdf
You just started a new job. The team you are working on is getting r.pdf
formicreation
 
Write a short report (2 pages) detailing what you think are real iss.pdf
Write a short report (2 pages) detailing what you think are real iss.pdfWrite a short report (2 pages) detailing what you think are real iss.pdf
Write a short report (2 pages) detailing what you think are real iss.pdf
formicreation
 
2 page paper describing the followingProvide a description of an o.pdf
2 page paper describing the followingProvide a description of an o.pdf2 page paper describing the followingProvide a description of an o.pdf
2 page paper describing the followingProvide a description of an o.pdf
formicreation
 

More from formicreation (20)

How can I tell when it is going to be a Archimedean Spiral. What is .pdf
How can I tell when it is going to be a Archimedean Spiral. What is .pdfHow can I tell when it is going to be a Archimedean Spiral. What is .pdf
How can I tell when it is going to be a Archimedean Spiral. What is .pdf
 
flow chart or step by step process of the key steps in forming a uni.pdf
flow chart or step by step process of the key steps in forming a uni.pdfflow chart or step by step process of the key steps in forming a uni.pdf
flow chart or step by step process of the key steps in forming a uni.pdf
 
Description For this part of the assignment, you will create a Grid .pdf
Description For this part of the assignment, you will create a Grid .pdfDescription For this part of the assignment, you will create a Grid .pdf
Description For this part of the assignment, you will create a Grid .pdf
 
Discuss one (1) traditional and two (2) new strategies that special i.pdf
Discuss one (1) traditional and two (2) new strategies that special i.pdfDiscuss one (1) traditional and two (2) new strategies that special i.pdf
Discuss one (1) traditional and two (2) new strategies that special i.pdf
 
Define health systems and healthcare delivery systems and discuss th.pdf
Define health systems and healthcare delivery systems and discuss th.pdfDefine health systems and healthcare delivery systems and discuss th.pdf
Define health systems and healthcare delivery systems and discuss th.pdf
 
B. You do an experiment in which you divide 8 cell stage urch.pdf
B. You do an experiment in which you divide 8 cell stage urch.pdfB. You do an experiment in which you divide 8 cell stage urch.pdf
B. You do an experiment in which you divide 8 cell stage urch.pdf
 
a. project aid. b. emergency aid. c. development aid. d. bilateral ai.pdf
a. project aid. b. emergency aid. c. development aid. d. bilateral ai.pdfa. project aid. b. emergency aid. c. development aid. d. bilateral ai.pdf
a. project aid. b. emergency aid. c. development aid. d. bilateral ai.pdf
 
An electron is moving in a circular motion clockwise. A uniform magne.pdf
An electron is moving in a circular motion clockwise. A uniform magne.pdfAn electron is moving in a circular motion clockwise. A uniform magne.pdf
An electron is moving in a circular motion clockwise. A uniform magne.pdf
 
After reading Thomas Malthus population theory and the ideas of Ju.pdf
After reading Thomas Malthus population theory and the ideas of Ju.pdfAfter reading Thomas Malthus population theory and the ideas of Ju.pdf
After reading Thomas Malthus population theory and the ideas of Ju.pdf
 
Any ideas on an IT topic I could use for this case studyFor this .pdf
Any ideas on an IT topic I could use for this case studyFor this .pdfAny ideas on an IT topic I could use for this case studyFor this .pdf
Any ideas on an IT topic I could use for this case studyFor this .pdf
 
Assignment is Page 349-350 #4 and #5 Use the Linked Lis.pdf
Assignment is Page 349-350 #4 and #5 Use the Linked Lis.pdfAssignment is Page 349-350 #4 and #5 Use the Linked Lis.pdf
Assignment is Page 349-350 #4 and #5 Use the Linked Lis.pdf
 
Why is it important for marketers to understand the product life cyc.pdf
Why is it important for marketers to understand the product life cyc.pdfWhy is it important for marketers to understand the product life cyc.pdf
Why is it important for marketers to understand the product life cyc.pdf
 
•From Chapter 1 of the textbook, President Wilson asserted that it i.pdf
•From Chapter 1 of the textbook, President Wilson asserted that it i.pdf•From Chapter 1 of the textbook, President Wilson asserted that it i.pdf
•From Chapter 1 of the textbook, President Wilson asserted that it i.pdf
 
What quality measures does the MCO have in placeSolutionManag.pdf
What quality measures does the MCO have in placeSolutionManag.pdfWhat quality measures does the MCO have in placeSolutionManag.pdf
What quality measures does the MCO have in placeSolutionManag.pdf
 
What information can a potential investor obtain from the cash fl.pdf
What information can a potential investor obtain from the cash fl.pdfWhat information can a potential investor obtain from the cash fl.pdf
What information can a potential investor obtain from the cash fl.pdf
 
What are three benefits of diversity What are three challenges of d.pdf
What are three benefits of diversity What are three challenges of d.pdfWhat are three benefits of diversity What are three challenges of d.pdf
What are three benefits of diversity What are three challenges of d.pdf
 
What role do birds play in the transmission of the West Nile virus W.pdf
What role do birds play in the transmission of the West Nile virus W.pdfWhat role do birds play in the transmission of the West Nile virus W.pdf
What role do birds play in the transmission of the West Nile virus W.pdf
 
You just started a new job. The team you are working on is getting r.pdf
You just started a new job. The team you are working on is getting r.pdfYou just started a new job. The team you are working on is getting r.pdf
You just started a new job. The team you are working on is getting r.pdf
 
Write a short report (2 pages) detailing what you think are real iss.pdf
Write a short report (2 pages) detailing what you think are real iss.pdfWrite a short report (2 pages) detailing what you think are real iss.pdf
Write a short report (2 pages) detailing what you think are real iss.pdf
 
2 page paper describing the followingProvide a description of an o.pdf
2 page paper describing the followingProvide a description of an o.pdf2 page paper describing the followingProvide a description of an o.pdf
2 page paper describing the followingProvide a description of an o.pdf
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 

C++ Write a function that takes a number as a parameter and display.pdf

  • 1. C++ Write a function that takes a number as a parameter and displays it like this: *** *** Data = # *** Create a program that uses this function along with the getNumber() function from the previous example to prompt the user for a number and then display it. Solution main.cpp #include using namespace std; // function declaration int getNumber(int num); int main () { int n; cout<<"Enter a number : "; cin>>n; cout<