SlideShare a Scribd company logo
C++ Programming Write a main()function that declares several integer, double, and City and
Planet objects, and uses the calcDistance()function to compute the distance for several pairs.
Save the file as Distance.cpp.
Solution
Here is the main() function for you:
main()
{
int pInt1, pInt2;
double pDouble1, pDouble2;
City pCity1, pCity2;
Planet pPlanet1, pPlanet2;
cout<<"The distance between "<

More Related Content

More from kellenaowardstrigl34

The portion of the fungus that projects above the substrate and conta.pdf
The portion of the fungus that projects above the substrate and conta.pdfThe portion of the fungus that projects above the substrate and conta.pdf
The portion of the fungus that projects above the substrate and conta.pdf
kellenaowardstrigl34
 
the appearance of symptoms of a genetic disorder at earlier ages in .pdf
the appearance of symptoms of a genetic disorder at earlier ages in .pdfthe appearance of symptoms of a genetic disorder at earlier ages in .pdf
the appearance of symptoms of a genetic disorder at earlier ages in .pdf
kellenaowardstrigl34
 
Stuck on hw problem Assume that the forces acting on a mass are such.pdf
Stuck on hw problem Assume that the forces acting on a mass are such.pdfStuck on hw problem Assume that the forces acting on a mass are such.pdf
Stuck on hw problem Assume that the forces acting on a mass are such.pdf
kellenaowardstrigl34
 
Some Giant Sulphur Bacteria are so large as to be visible to the nak.pdf
Some Giant Sulphur Bacteria are so large as to be visible to the nak.pdfSome Giant Sulphur Bacteria are so large as to be visible to the nak.pdf
Some Giant Sulphur Bacteria are so large as to be visible to the nak.pdf
kellenaowardstrigl34
 
right now I am using a l293d chip to control my DC motor which is 6 .pdf
right now I am using a l293d chip to control my DC motor which is 6 .pdfright now I am using a l293d chip to control my DC motor which is 6 .pdf
right now I am using a l293d chip to control my DC motor which is 6 .pdf
kellenaowardstrigl34
 
Problem 1 Eclipses and occults Saturn has five satellites that rotat.pdf
Problem 1 Eclipses and occults Saturn has five satellites that rotat.pdfProblem 1 Eclipses and occults Saturn has five satellites that rotat.pdf
Problem 1 Eclipses and occults Saturn has five satellites that rotat.pdf
kellenaowardstrigl34
 
please show work A hospital reports that two patients have been admi.pdf
please show work A hospital reports that two patients have been admi.pdfplease show work A hospital reports that two patients have been admi.pdf
please show work A hospital reports that two patients have been admi.pdf
kellenaowardstrigl34
 
Person.java is givenSolutionSince I didnt have the implement.pdf
Person.java is givenSolutionSince I didnt have the implement.pdfPerson.java is givenSolutionSince I didnt have the implement.pdf
Person.java is givenSolutionSince I didnt have the implement.pdf
kellenaowardstrigl34
 
In java languageWhich of the following is falseA) A JPasswordFi.pdf
In java languageWhich of the following is falseA) A JPasswordFi.pdfIn java languageWhich of the following is falseA) A JPasswordFi.pdf
In java languageWhich of the following is falseA) A JPasswordFi.pdf
kellenaowardstrigl34
 
in a completely randomized (one-way) anova, with other things being .pdf
in a completely randomized (one-way) anova, with other things being .pdfin a completely randomized (one-way) anova, with other things being .pdf
in a completely randomized (one-way) anova, with other things being .pdf
kellenaowardstrigl34
 
I want you to go the Next Generation Sunshine State standards (http.pdf
I want you to go the Next Generation Sunshine State standards (http.pdfI want you to go the Next Generation Sunshine State standards (http.pdf
I want you to go the Next Generation Sunshine State standards (http.pdf
kellenaowardstrigl34
 
How are macromolecules transported across the nuclear envelope Desc.pdf
How are macromolecules transported across the nuclear envelope Desc.pdfHow are macromolecules transported across the nuclear envelope Desc.pdf
How are macromolecules transported across the nuclear envelope Desc.pdf
kellenaowardstrigl34
 
GeneticsBackground info About 30 of the Irish population has red.pdf
GeneticsBackground info About 30 of the Irish population has red.pdfGeneticsBackground info About 30 of the Irish population has red.pdf
GeneticsBackground info About 30 of the Irish population has red.pdf
kellenaowardstrigl34
 
Fishes are at the base of the vertebrate Tree of Life and fishes do .pdf
Fishes are at the base of the vertebrate Tree of Life and fishes do .pdfFishes are at the base of the vertebrate Tree of Life and fishes do .pdf
Fishes are at the base of the vertebrate Tree of Life and fishes do .pdf
kellenaowardstrigl34
 
Consider two point sources separated by a distance of 10 meters. The .pdf
Consider two point sources separated by a distance of 10 meters. The .pdfConsider two point sources separated by a distance of 10 meters. The .pdf
Consider two point sources separated by a distance of 10 meters. The .pdf
kellenaowardstrigl34
 
Consider the following system microprocessor based system Program t.pdf
Consider the following system microprocessor based system  Program t.pdfConsider the following system microprocessor based system  Program t.pdf
Consider the following system microprocessor based system Program t.pdf
kellenaowardstrigl34
 
Develop an algorithm for the 4-sum problem.SolutionThe algorit.pdf
Develop an algorithm for the 4-sum problem.SolutionThe algorit.pdfDevelop an algorithm for the 4-sum problem.SolutionThe algorit.pdf
Develop an algorithm for the 4-sum problem.SolutionThe algorit.pdf
kellenaowardstrigl34
 
Describe the repair mechanisms used during DNA replication.Soluti.pdf
Describe the repair mechanisms used during DNA replication.Soluti.pdfDescribe the repair mechanisms used during DNA replication.Soluti.pdf
Describe the repair mechanisms used during DNA replication.Soluti.pdf
kellenaowardstrigl34
 
Describe the current state of the human beta globin gene family and .pdf
Describe the current state of the human beta globin gene family and .pdfDescribe the current state of the human beta globin gene family and .pdf
Describe the current state of the human beta globin gene family and .pdf
kellenaowardstrigl34
 
Derived characteristics that define the order Primate include    a.pdf
Derived characteristics that define the order Primate include    a.pdfDerived characteristics that define the order Primate include    a.pdf
Derived characteristics that define the order Primate include    a.pdf
kellenaowardstrigl34
 

More from kellenaowardstrigl34 (20)

The portion of the fungus that projects above the substrate and conta.pdf
The portion of the fungus that projects above the substrate and conta.pdfThe portion of the fungus that projects above the substrate and conta.pdf
The portion of the fungus that projects above the substrate and conta.pdf
 
the appearance of symptoms of a genetic disorder at earlier ages in .pdf
the appearance of symptoms of a genetic disorder at earlier ages in .pdfthe appearance of symptoms of a genetic disorder at earlier ages in .pdf
the appearance of symptoms of a genetic disorder at earlier ages in .pdf
 
Stuck on hw problem Assume that the forces acting on a mass are such.pdf
Stuck on hw problem Assume that the forces acting on a mass are such.pdfStuck on hw problem Assume that the forces acting on a mass are such.pdf
Stuck on hw problem Assume that the forces acting on a mass are such.pdf
 
Some Giant Sulphur Bacteria are so large as to be visible to the nak.pdf
Some Giant Sulphur Bacteria are so large as to be visible to the nak.pdfSome Giant Sulphur Bacteria are so large as to be visible to the nak.pdf
Some Giant Sulphur Bacteria are so large as to be visible to the nak.pdf
 
right now I am using a l293d chip to control my DC motor which is 6 .pdf
right now I am using a l293d chip to control my DC motor which is 6 .pdfright now I am using a l293d chip to control my DC motor which is 6 .pdf
right now I am using a l293d chip to control my DC motor which is 6 .pdf
 
Problem 1 Eclipses and occults Saturn has five satellites that rotat.pdf
Problem 1 Eclipses and occults Saturn has five satellites that rotat.pdfProblem 1 Eclipses and occults Saturn has five satellites that rotat.pdf
Problem 1 Eclipses and occults Saturn has five satellites that rotat.pdf
 
please show work A hospital reports that two patients have been admi.pdf
please show work A hospital reports that two patients have been admi.pdfplease show work A hospital reports that two patients have been admi.pdf
please show work A hospital reports that two patients have been admi.pdf
 
Person.java is givenSolutionSince I didnt have the implement.pdf
Person.java is givenSolutionSince I didnt have the implement.pdfPerson.java is givenSolutionSince I didnt have the implement.pdf
Person.java is givenSolutionSince I didnt have the implement.pdf
 
In java languageWhich of the following is falseA) A JPasswordFi.pdf
In java languageWhich of the following is falseA) A JPasswordFi.pdfIn java languageWhich of the following is falseA) A JPasswordFi.pdf
In java languageWhich of the following is falseA) A JPasswordFi.pdf
 
in a completely randomized (one-way) anova, with other things being .pdf
in a completely randomized (one-way) anova, with other things being .pdfin a completely randomized (one-way) anova, with other things being .pdf
in a completely randomized (one-way) anova, with other things being .pdf
 
I want you to go the Next Generation Sunshine State standards (http.pdf
I want you to go the Next Generation Sunshine State standards (http.pdfI want you to go the Next Generation Sunshine State standards (http.pdf
I want you to go the Next Generation Sunshine State standards (http.pdf
 
How are macromolecules transported across the nuclear envelope Desc.pdf
How are macromolecules transported across the nuclear envelope Desc.pdfHow are macromolecules transported across the nuclear envelope Desc.pdf
How are macromolecules transported across the nuclear envelope Desc.pdf
 
GeneticsBackground info About 30 of the Irish population has red.pdf
GeneticsBackground info About 30 of the Irish population has red.pdfGeneticsBackground info About 30 of the Irish population has red.pdf
GeneticsBackground info About 30 of the Irish population has red.pdf
 
Fishes are at the base of the vertebrate Tree of Life and fishes do .pdf
Fishes are at the base of the vertebrate Tree of Life and fishes do .pdfFishes are at the base of the vertebrate Tree of Life and fishes do .pdf
Fishes are at the base of the vertebrate Tree of Life and fishes do .pdf
 
Consider two point sources separated by a distance of 10 meters. The .pdf
Consider two point sources separated by a distance of 10 meters. The .pdfConsider two point sources separated by a distance of 10 meters. The .pdf
Consider two point sources separated by a distance of 10 meters. The .pdf
 
Consider the following system microprocessor based system Program t.pdf
Consider the following system microprocessor based system  Program t.pdfConsider the following system microprocessor based system  Program t.pdf
Consider the following system microprocessor based system Program t.pdf
 
Develop an algorithm for the 4-sum problem.SolutionThe algorit.pdf
Develop an algorithm for the 4-sum problem.SolutionThe algorit.pdfDevelop an algorithm for the 4-sum problem.SolutionThe algorit.pdf
Develop an algorithm for the 4-sum problem.SolutionThe algorit.pdf
 
Describe the repair mechanisms used during DNA replication.Soluti.pdf
Describe the repair mechanisms used during DNA replication.Soluti.pdfDescribe the repair mechanisms used during DNA replication.Soluti.pdf
Describe the repair mechanisms used during DNA replication.Soluti.pdf
 
Describe the current state of the human beta globin gene family and .pdf
Describe the current state of the human beta globin gene family and .pdfDescribe the current state of the human beta globin gene family and .pdf
Describe the current state of the human beta globin gene family and .pdf
 
Derived characteristics that define the order Primate include    a.pdf
Derived characteristics that define the order Primate include    a.pdfDerived characteristics that define the order Primate include    a.pdf
Derived characteristics that define the order Primate include    a.pdf
 

Recently uploaded

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
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
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
Kavitha Krishnan
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
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
 
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
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
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
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
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
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
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
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
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
 

Recently uploaded (20)

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
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” .
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
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
 
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...
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
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
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
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
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
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
 

C++ Programming Write a main()function that declares several integer.pdf

  • 1. C++ Programming Write a main()function that declares several integer, double, and City and Planet objects, and uses the calcDistance()function to compute the distance for several pairs. Save the file as Distance.cpp. Solution Here is the main() function for you: main() { int pInt1, pInt2; double pDouble1, pDouble2; City pCity1, pCity2; Planet pPlanet1, pPlanet2; cout<<"The distance between "<