SlideShare une entreprise Scribd logo
1  sur  2
Please write the solution in the c++ language
Write a program that reads six wall lengths, one room height, and prints out the total wall area.
Useful for determining how much paint to buy to cover a room, or how much building materials
to buy.
+-----+
|Â Â Â Â |
|Â Â +-+
|Â Â |
+---+
Solution
#include <iostream>
using namespace std;
int main() {
int walls[6];
int height;
int total=0;
for(int i=0;i<6;i++)
{
cout<<" Enter Wall "<<i+1<<" length: ";
cin>>walls[i];
}
cout<<" Enter Room Height: ";
cin>>height;
cout<<" ";
for(int i=0;i<6;i++)
{
cout<<" Area of Wall "<<i+1<<" is: "<<walls[i]*height;
total+=walls[i]*height;
}
cout<<"  Total Area is: "<<total;
return 0;
}
output:
Enter Wall 1 length: 10
Enter Wall 2 length: 20
Enter Wall 3 length: 10
Enter Wall 4 length: 20
Enter Wall 5 length: 30
Enter Wall 6 length: 20
Enter Room Height: 20
Area of Wall 1 is: 200
Area of Wall 2 is: 400
Area of Wall 3 is: 200
Area of Wall 4 is: 400
Area of Wall 5 is: 600
Area of Wall 6 is: 400
Total Area is: 2200
RUN SUCCESSFUL (total time: 13s)

Contenu connexe

Similaire à Please write the solution in the c++ language Write a program that rea.docx

Chapter 7 - Input Output Statements in C++
Chapter 7 - Input Output Statements in C++Chapter 7 - Input Output Statements in C++
Chapter 7 - Input Output Statements in C++Deepak Singh
 
C++ L03-Control Structure
C++ L03-Control StructureC++ L03-Control Structure
C++ L03-Control StructureMohammad Shaker
 
Assignement of programming & problem solving
Assignement of programming & problem solvingAssignement of programming & problem solving
Assignement of programming & problem solvingSyed Umair
 
clc02_cpp_presentation_edit3 (1) 1.pptx
clc02_cpp_presentation_edit3 (1) 1.pptxclc02_cpp_presentation_edit3 (1) 1.pptx
clc02_cpp_presentation_edit3 (1) 1.pptxjminrin0212
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...ANUSUYA S
 
ma project
ma projectma project
ma projectAisu
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.pptJoshCasas1
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.pptUdhayaKumar175069
 
Survey of programming language getting started in C
Survey of programming language getting started in CSurvey of programming language getting started in C
Survey of programming language getting started in Cummeafruz
 
270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functionsray143eddie
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.pptAlefya1
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ toolAbdullah Jan
 
Lab-11-C-Problems.pptx
Lab-11-C-Problems.pptxLab-11-C-Problems.pptx
Lab-11-C-Problems.pptxShimoFcis
 
Array and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptxArray and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptxJumanneChiyanda
 
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdf
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdfC++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdf
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdfaassecuritysystem
 

Similaire à Please write the solution in the c++ language Write a program that rea.docx (20)

Chapter 7 - Input Output Statements in C++
Chapter 7 - Input Output Statements in C++Chapter 7 - Input Output Statements in C++
Chapter 7 - Input Output Statements in C++
 
C++ L03-Control Structure
C++ L03-Control StructureC++ L03-Control Structure
C++ L03-Control Structure
 
Assignement of programming & problem solving
Assignement of programming & problem solvingAssignement of programming & problem solving
Assignement of programming & problem solving
 
clc02_cpp_presentation_edit3 (1) 1.pptx
clc02_cpp_presentation_edit3 (1) 1.pptxclc02_cpp_presentation_edit3 (1) 1.pptx
clc02_cpp_presentation_edit3 (1) 1.pptx
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
 
ma project
ma projectma project
ma project
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
Survey of programming language getting started in C
Survey of programming language getting started in CSurvey of programming language getting started in C
Survey of programming language getting started in C
 
270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
C++ TUTORIAL 2
C++ TUTORIAL 2C++ TUTORIAL 2
C++ TUTORIAL 2
 
Project in programming
Project in programmingProject in programming
Project in programming
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ tool
 
Lab-11-C-Problems.pptx
Lab-11-C-Problems.pptxLab-11-C-Problems.pptx
Lab-11-C-Problems.pptx
 
Array and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptxArray and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptx
 
Cs project
Cs projectCs project
Cs project
 
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdf
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdfC++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdf
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdf
 
Bijender (1)
Bijender (1)Bijender (1)
Bijender (1)
 
C++ L01-Variables
C++ L01-VariablesC++ L01-Variables
C++ L01-Variables
 

Plus de helenc18

The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docx
The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docxThe total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docx
The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docxhelenc18
 
The Tinsley Company exchanged land that it had been holding for future.docx
The Tinsley Company exchanged land that it had been holding for future.docxThe Tinsley Company exchanged land that it had been holding for future.docx
The Tinsley Company exchanged land that it had been holding for future.docxhelenc18
 
The State of Rhode Island publishes its budget and the various support.docx
The State of Rhode Island publishes its budget and the various support.docxThe State of Rhode Island publishes its budget and the various support.docx
The State of Rhode Island publishes its budget and the various support.docxhelenc18
 
The SRLY rules for consolidated tax returns are designed to keep corpo.docx
The SRLY rules for consolidated tax returns are designed to keep corpo.docxThe SRLY rules for consolidated tax returns are designed to keep corpo.docx
The SRLY rules for consolidated tax returns are designed to keep corpo.docxhelenc18
 
The sound strikes the cantina walls and bounces off at the same angle.docx
The sound strikes the cantina walls and bounces off at the same angle.docxThe sound strikes the cantina walls and bounces off at the same angle.docx
The sound strikes the cantina walls and bounces off at the same angle.docxhelenc18
 
The six platforms below are initially at rest in deep space- The indic.docx
The six platforms below are initially at rest in deep space- The indic.docxThe six platforms below are initially at rest in deep space- The indic.docx
The six platforms below are initially at rest in deep space- The indic.docxhelenc18
 
The rise of various digital communication methods in the past decade h.docx
The rise of various digital communication methods in the past decade h.docxThe rise of various digital communication methods in the past decade h.docx
The rise of various digital communication methods in the past decade h.docxhelenc18
 
The reason that the increase in population growth in the 19th and 20th.docx
The reason that the increase in population growth in the 19th and 20th.docxThe reason that the increase in population growth in the 19th and 20th.docx
The reason that the increase in population growth in the 19th and 20th.docxhelenc18
 
The sale of stock and the sale of bonds are reported as financing acti.docx
The sale of stock and the sale of bonds are reported as financing acti.docxThe sale of stock and the sale of bonds are reported as financing acti.docx
The sale of stock and the sale of bonds are reported as financing acti.docxhelenc18
 
Precipitation volumetric analysis involves formation reactions of solu.docx
Precipitation volumetric analysis involves formation reactions of solu.docxPrecipitation volumetric analysis involves formation reactions of solu.docx
Precipitation volumetric analysis involves formation reactions of solu.docxhelenc18
 
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docx
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docxPOST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docx
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docxhelenc18
 
Portman Corporation has retained earnings of $675-000 at January 1- 20.docx
Portman Corporation has retained earnings of $675-000 at January 1- 20.docxPortman Corporation has retained earnings of $675-000 at January 1- 20.docx
Portman Corporation has retained earnings of $675-000 at January 1- 20.docxhelenc18
 
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docx
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docxPlease write it in Microsoft Word- Not in handwritten form- I-'ll give.docx
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docxhelenc18
 
please write carefully and explain clearly- Thank you-SolutionKsp of C.docx
please write carefully and explain clearly- Thank you-SolutionKsp of C.docxplease write carefully and explain clearly- Thank you-SolutionKsp of C.docx
please write carefully and explain clearly- Thank you-SolutionKsp of C.docxhelenc18
 
Prioritize the three themes of integrated solid waste management- 1^st.docx
Prioritize the three themes of integrated solid waste management- 1^st.docxPrioritize the three themes of integrated solid waste management- 1^st.docx
Prioritize the three themes of integrated solid waste management- 1^st.docxhelenc18
 
present synchronized savage code while (1) { getServingFromPot ()- ea.docx
present synchronized savage code while (1) {  getServingFromPot ()- ea.docxpresent synchronized savage code while (1) {  getServingFromPot ()- ea.docx
present synchronized savage code while (1) { getServingFromPot ()- ea.docxhelenc18
 
Prepare general journal entries to record the following transactions f.docx
Prepare general journal entries to record the following transactions f.docxPrepare general journal entries to record the following transactions f.docx
Prepare general journal entries to record the following transactions f.docxhelenc18
 
Prepare functional specifications for the company-'s use of the Web an.docx
Prepare functional specifications for the company-'s use of the Web an.docxPrepare functional specifications for the company-'s use of the Web an.docx
Prepare functional specifications for the company-'s use of the Web an.docxhelenc18
 
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docx
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docxPrepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docx
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docxhelenc18
 

Plus de helenc18 (19)

The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docx
The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docxThe total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docx
The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docx
 
The Tinsley Company exchanged land that it had been holding for future.docx
The Tinsley Company exchanged land that it had been holding for future.docxThe Tinsley Company exchanged land that it had been holding for future.docx
The Tinsley Company exchanged land that it had been holding for future.docx
 
The State of Rhode Island publishes its budget and the various support.docx
The State of Rhode Island publishes its budget and the various support.docxThe State of Rhode Island publishes its budget and the various support.docx
The State of Rhode Island publishes its budget and the various support.docx
 
The SRLY rules for consolidated tax returns are designed to keep corpo.docx
The SRLY rules for consolidated tax returns are designed to keep corpo.docxThe SRLY rules for consolidated tax returns are designed to keep corpo.docx
The SRLY rules for consolidated tax returns are designed to keep corpo.docx
 
The sound strikes the cantina walls and bounces off at the same angle.docx
The sound strikes the cantina walls and bounces off at the same angle.docxThe sound strikes the cantina walls and bounces off at the same angle.docx
The sound strikes the cantina walls and bounces off at the same angle.docx
 
The six platforms below are initially at rest in deep space- The indic.docx
The six platforms below are initially at rest in deep space- The indic.docxThe six platforms below are initially at rest in deep space- The indic.docx
The six platforms below are initially at rest in deep space- The indic.docx
 
The rise of various digital communication methods in the past decade h.docx
The rise of various digital communication methods in the past decade h.docxThe rise of various digital communication methods in the past decade h.docx
The rise of various digital communication methods in the past decade h.docx
 
The reason that the increase in population growth in the 19th and 20th.docx
The reason that the increase in population growth in the 19th and 20th.docxThe reason that the increase in population growth in the 19th and 20th.docx
The reason that the increase in population growth in the 19th and 20th.docx
 
The sale of stock and the sale of bonds are reported as financing acti.docx
The sale of stock and the sale of bonds are reported as financing acti.docxThe sale of stock and the sale of bonds are reported as financing acti.docx
The sale of stock and the sale of bonds are reported as financing acti.docx
 
Precipitation volumetric analysis involves formation reactions of solu.docx
Precipitation volumetric analysis involves formation reactions of solu.docxPrecipitation volumetric analysis involves formation reactions of solu.docx
Precipitation volumetric analysis involves formation reactions of solu.docx
 
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docx
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docxPOST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docx
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docx
 
Portman Corporation has retained earnings of $675-000 at January 1- 20.docx
Portman Corporation has retained earnings of $675-000 at January 1- 20.docxPortman Corporation has retained earnings of $675-000 at January 1- 20.docx
Portman Corporation has retained earnings of $675-000 at January 1- 20.docx
 
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docx
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docxPlease write it in Microsoft Word- Not in handwritten form- I-'ll give.docx
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docx
 
please write carefully and explain clearly- Thank you-SolutionKsp of C.docx
please write carefully and explain clearly- Thank you-SolutionKsp of C.docxplease write carefully and explain clearly- Thank you-SolutionKsp of C.docx
please write carefully and explain clearly- Thank you-SolutionKsp of C.docx
 
Prioritize the three themes of integrated solid waste management- 1^st.docx
Prioritize the three themes of integrated solid waste management- 1^st.docxPrioritize the three themes of integrated solid waste management- 1^st.docx
Prioritize the three themes of integrated solid waste management- 1^st.docx
 
present synchronized savage code while (1) { getServingFromPot ()- ea.docx
present synchronized savage code while (1) {  getServingFromPot ()- ea.docxpresent synchronized savage code while (1) {  getServingFromPot ()- ea.docx
present synchronized savage code while (1) { getServingFromPot ()- ea.docx
 
Prepare general journal entries to record the following transactions f.docx
Prepare general journal entries to record the following transactions f.docxPrepare general journal entries to record the following transactions f.docx
Prepare general journal entries to record the following transactions f.docx
 
Prepare functional specifications for the company-'s use of the Web an.docx
Prepare functional specifications for the company-'s use of the Web an.docxPrepare functional specifications for the company-'s use of the Web an.docx
Prepare functional specifications for the company-'s use of the Web an.docx
 
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docx
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docxPrepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docx
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docx
 

Dernier

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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.pptxheathfieldcps1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 

Dernier (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

Please write the solution in the c++ language Write a program that rea.docx

  • 1. Please write the solution in the c++ language Write a program that reads six wall lengths, one room height, and prints out the total wall area. Useful for determining how much paint to buy to cover a room, or how much building materials to buy. +-----+ |Â Â Â Â | |Â Â +-+ |Â Â | +---+ Solution #include <iostream> using namespace std; int main() { int walls[6]; int height; int total=0; for(int i=0;i<6;i++) { cout<<" Enter Wall "<<i+1<<" length: "; cin>>walls[i]; } cout<<" Enter Room Height: "; cin>>height; cout<<" "; for(int i=0;i<6;i++) { cout<<" Area of Wall "<<i+1<<" is: "<<walls[i]*height; total+=walls[i]*height; } cout<<" Total Area is: "<<total;
  • 2. return 0; } output: Enter Wall 1 length: 10 Enter Wall 2 length: 20 Enter Wall 3 length: 10 Enter Wall 4 length: 20 Enter Wall 5 length: 30 Enter Wall 6 length: 20 Enter Room Height: 20 Area of Wall 1 is: 200 Area of Wall 2 is: 400 Area of Wall 3 is: 200 Area of Wall 4 is: 400 Area of Wall 5 is: 600 Area of Wall 6 is: 400 Total Area is: 2200 RUN SUCCESSFUL (total time: 13s)